{"id":16697,"date":"2021-07-08T13:24:46","date_gmt":"2021-07-08T11:24:46","guid":{"rendered":"https:\/\/herolab-usd.formwandler.rocks\/security-advisories\/usd-2020-0049\/"},"modified":"2021-07-19T14:16:27","modified_gmt":"2021-07-19T12:16:27","slug":"usd-2020-0049","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2020-0049\/","title":{"rendered":"usd-2020-0049"},"content":{"rendered":"<p>[et_pb_section fb_built=\"1\" _builder_version=\"4.9.4\" _module_preset=\"default\" background_color=\"#2E353D\" custom_padding=\"||0px|||\"][et_pb_row _builder_version=\"4.9.4\" _module_preset=\"default\"][et_pb_column type=\"4_4\" _builder_version=\"4.9.4\" _module_preset=\"default\"][et_pb_text _builder_version=\"4.9.4\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" hover_enabled=\"0\" sticky_enabled=\"0\"]<\/p>\n<h1 class=\"h-custom-headline usd-small-letters h2\"><span>usd-2020-0049 | Gophish v0.10.1<\/span><\/h1>\n<p><span><\/span><br \/><strong>Advisory ID<\/strong><span>: usd-2020-0049<\/span><br \/><strong>CVE Number<\/strong><span>: CVE-2020-24709<\/span><br \/><strong>Affected Product<\/strong><span>: Gophish<\/span><br \/><strong>Affected Version<\/strong><span>: v0.10.1<\/span><br \/><strong>Vulnerability Type<\/strong><span>: Stored Cross-Site Scripting<\/span><br \/><strong>Security Risk<\/strong><span>: Medium<\/span><br \/><strong>Vendor URL<\/strong><span>: <a href=\"https:\/\/getgophish.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/getgophish.com\/<\/a><\/span><br \/><strong>Vendor Status<\/strong><span>: Fixed<\/span><\/p>\n<h3><\/h3>\n<h3>Description<\/h3>\n<p>The preview feature of the HTML editor in Landing Pages &gt; New Landing Page allows for execution of XSS payloads that are injected into the source text area. The XSS gets stored when saving a page. A rogue user could exploit an admin by asking him to impersonate him and preview his broken Landing Page.<\/p>\n<p>Additionally, the preview feature of the HTML editor in Email Templates &gt; New Template allows for execution of XSS payloads that are injected into the source text area. The XSS gets stored when saving a template. A rogue user could exploit an admin by asking him to impersonate him and preview his broken email template.<\/p>\n<h3>Proof of Concept (PoC)<\/h3>\n<h4>On the landing page<\/h4>\n<p>As a user, create a new landing page (\/landing_pages) include a XSS payload. Click the editor\u2019s \u201epreview\u201c button and observe that the JavaScript is executed<\/p>\n<p>[\/et_pb_text][et_pb_image src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2021\/07\/usd20200049-1.png\" _builder_version=\"4.9.4\" _module_preset=\"default\" title_text=\"usd20200049-1\" hover_enabled=\"0\" sticky_enabled=\"0\"][\/et_pb_image][et_pb_text _builder_version=\"4.9.4\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" custom_margin=\"||27px||false|false\" hover_enabled=\"0\" sticky_enabled=\"0\"]<\/p>\n<h4>Email template<\/h4>\n<p>As a user, create a new email template (\/template) include a XSS payload.<br \/>Click the editor\u2019s \u201epreview\u201c button and observe that the JavaScript is executed<\/p>\n<p>[\/et_pb_text][et_pb_image src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2021\/07\/usd20200049-2.png\" title_text=\"usd20200049-2\" _builder_version=\"4.9.4\" _module_preset=\"default\" custom_margin=\"27px||43px||false|false\" hover_enabled=\"0\" sticky_enabled=\"0\"][\/et_pb_image][et_pb_text _builder_version=\"4.9.4\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" hover_enabled=\"0\" sticky_enabled=\"0\"]<\/p>\n<div class=\"e16902-22 x-container max width\">\n<div class=\"e16902-23 x-column x-sm x-1-1\">\n<p><span>An XSS vulnerability can be exploited in various ways. A common attack is to steal sensitive information<\/span><br \/><span>from the user and secretly transmit it to the attacker. The gophish session cookie is protected with the<\/span><br \/><span>HttpOnly flag and the page does not accept TRACE or TRACK requests. However it might be possible<\/span><br \/><span>for an attacker to perform actions with the rights of the user.<\/span><\/p>\n<h3>Fix<\/h3>\n<p><span>It is recommended to treat all input on the website as potentially dangerous. Hence, all output that is dynamically generated based on user-controlled data should be encoded according to its context. The majority of programming languages support standard procedures for encoding meta characters. For example, PHP has the built-in function htmlspecialchars().<\/span><br \/><span>Additionally, all input should be validated on the server-side. Where possible, whitelist filters should be used. The more restrictive a filter can be specified, the better the protection it provides. Whitelisting is especially recommended if input values have a well defined format or a list of valid input values exists. Invalid values should not be sanitized and forwarded to the application. Instead, requests with invalid values should be rejected.<\/span><\/p>\n<h3><\/h3>\n<h3>Timeline<\/h3>\n<ul>\n<li>2020-06-18 First contact request via security@getgophish.com<\/li>\n<li>2020-06-22 Vendor responds to initial contact<\/li>\n<li>2020-08-07 Vendor publishes a fix<\/li>\n<li>2020-09-29 Security advisory released<\/li>\n<\/ul>\n<h3><\/h3>\n<h3>Credits<\/h3>\n<p><span>This security vulnerability was found by Marcus Nilsson of usd AG<\/span><\/p>\n<\/div>\n<\/div>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>usd-2020-0049 | Gophish v0.10.1 Advisory ID: usd-2020-0049CVE Number: CVE-2020-24709Affected Product: GophishAffected Version: v0.10.1Vulnerability Type: Stored Cross-Site ScriptingSecurity Risk: MediumVendor URL: https:\/\/getgophish.com\/Vendor Status: Fixed Description The preview feature of the HTML editor in Landing Pages &gt; New Landing Page allows for execution of XSS payloads that are injected into the source text area. The XSS gets [&hellip;]<\/p>\n","protected":false},"author":96,"featured_media":0,"parent":16124,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","inline_featured_image":false,"footnotes":""},"class_list":["post-16697","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/16697","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/users\/96"}],"replies":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/comments?post=16697"}],"version-history":[{"count":0,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/16697\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/16124"}],"wp:attachment":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/media?parent=16697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}