{"id":24594,"date":"2025-12-01T13:55:58","date_gmt":"2025-12-01T12:55:58","guid":{"rendered":"https:\/\/herolab.usd.de\/?page_id=24594"},"modified":"2025-12-10T14:36:06","modified_gmt":"2025-12-10T13:36:06","slug":"usd-2025-0047","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2025-0047\/","title":{"rendered":"usd-2025-0047"},"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.4\" _module_preset=\"default\" custom_padding=\"||13px|||\" hover_enabled=\"0\" global_colors_info=\"{}\" sticky_enabled=\"0\"]<\/p>\n<h1>usd-2025-47 | OrangeHRM OS 5.7 - Improper Neutralization of Special Elements used in an OS Command<\/h1>\n<h1><\/h1>\n<p><strong>Product<\/strong>: OrangeHRM OS<br \/><strong>Affected Version<\/strong>: 5.7<br \/><strong>Vulnerability Type<\/strong>: Improper Neutralization of Special Elements used in an OS Command (CWE-78)<br \/><strong>Security Risk<\/strong>: Critical<br \/><strong>Vendor<\/strong>: OrangeHRM Inc<br \/><strong>Vendor URL<\/strong>: <a href=\"https:\/\/www.orangehrm.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.orangehrm.com\/<\/a><br \/><strong>Vendor acknowledged vulnerability<\/strong>: Yes<br \/><strong>Vendor Status<\/strong>: Fixed<br \/><strong>CVE Number<\/strong>: CVE-2025-66224<br \/><strong>CVE Link<\/strong>: <a href=\"https:\/\/www.cve.org\/CVERecord?id=CVE-2025-66224\" target=\"_blank\" rel=\"noopener\">https:\/\/www.cve.org\/CVERecord?id=CVE-2025-66224<\/a><br \/><strong>Advisory ID<\/strong>: usd-2025-47<\/p>\n<h3>Description<\/h3>\n<p><!-- add a description of the application and vulnerability -->OrangeHRM describes itself as a comprehensive Human Resource Management (HRM) System that captures all the essential functionalities required for any enterprise. OrangeHRM OS is its open source version.<\/p>\n<p>Version 5.7 of OrangeHRM allows authenticated attackers OS command injection via mail configuration.<\/p>\n<p>First of all, it should be noted that certain requirements must be met for successful exploitation:<\/p>\n<ul>\n<li>A properly installed and configured version of <strong>sendmail<\/strong> is required. According to the GitHub issues, the Ubuntu <strong>sendmail<\/strong> package does not work properly with the <strong>-bs<\/strong> parameter. See here: <a>https:\/\/github.com\/orangehrm\/orangehrm\/issues\/1734<\/a> This setting can only be changed via database access. Additionally, <strong>sendmail<\/strong> must be selected as the active mail component for sending emails. This setting can be configured by administrative accounts within the application.<\/li>\n<li>Provided that <strong>sendmail<\/strong> is properly installed, configured and selected as the active mail component for sending emails, exploitation is also possible by users with low privileges.<\/li>\n<\/ul>\n<h3>Proof of Concept<\/h3>\n<p><!-- describe how the vulnerability can be exploited, feel free to add supporting images etc. -->Administrative users can perform the mail configuration in the administration menu. For successful exploitation, <strong>sendmail<\/strong> must be selected as the sending method, as shown in the following screenshot:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2025\/11\/mail_configuration.png\" width=\"966\" height=\"451\" alt=\"\" class=\"wp-image-24568 alignnone size-full\" srcset=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2025\/11\/mail_configuration.png 966w, https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2025\/11\/mail_configuration-480x224.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 966px, 100vw\" \/><\/p>\n<p>The default value for the path to sendmail is <strong>\/usr\/bin\/sendmail -bs<\/strong>. As described in issue 1734 <a>https:\/\/github.com\/orangehrm\/orangehrm\/issues\/1734,<\/a> sending mails fails with this setting in Ubuntu. As a workaround, the parameter must be changed from <strong>-bs<\/strong> to <strong>-t<\/strong>. This setting can only be changed with database access.<\/p>\n<p>With the working configuration, a low-privileged user can now, for example, use the password reset function to generate and send an email. The user can specify the name and email address themselves. It is possible to embed PHP code as the name, such as <strong>&lt;?php phpinfo();?&gt;<\/strong>. The email address can be set, as in the following example, as <strong>-X\/var\/www\/html\/exec@mail.php<\/strong>, which is then passed to the sendmail command. The <strong>-X<\/strong> parameter in sendmail is used to save the sent mail in a log file. As shown, the storage location of the log file is defined with the <strong>.php<\/strong> file extension in the webroot:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2025\/11\/personalinfos.png\" width=\"500\" height=\"545\" alt=\"\" class=\"wp-image-24570 alignnone size-full\" srcset=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2025\/11\/personalinfos.png 500w, https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2025\/11\/personalinfos-480x523.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 500px, 100vw\" \/><\/p>\n<p>When a user now uses the password reset function, the logged email is stored in the file <strong>exec@mail.php<\/strong> in the web root. The PHP code previously entered in the name field is executed, as shown here:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2025\/11\/exec.png\" width=\"1759\" height=\"485\" alt=\"\" class=\"wp-image-24572 alignnone size-full\" srcset=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2025\/11\/exec.png 1759w, https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2025\/11\/exec-1280x353.png 1280w, https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2025\/11\/exec-980x270.png 980w, https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2025\/11\/exec-480x132.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) and (max-width: 1280px) 1280px, (min-width: 1281px) 1759px, 100vw\" \/><\/p>\n<h3>Fix<\/h3>\n<p><!-- how the vendor can fix the vulnerability.--><br \/><!-- if you recommended a quick workaround to the customer (and they are fine with you including it here!) feel free to add this information as well -->It is recommended to always validate and sanitize all inputs used in OS commands, employ parameterized APIs whenever possible, and avoid constructing command strings with user-controlled data.<\/p>\n<h3>References<\/h3>\n<p><!-- add references to the application and vulnerability.--><\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/orangehrm\/orangehrm\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/orangehrm\/orangehrm<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/orangehrm\/orangehrm\/security\/advisories\/GHSA-2w7w-h5wv-xr55\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/orangehrm\/orangehrm\/security\/advisories\/GHSA-2w7w-h5wv-xr55<\/a><\/li>\n<\/ul>\n<h3>Timeline<\/h3>\n<ul>\n<li><strong>2025-09-12<\/strong>: First contact request via e-mail.<\/li>\n<li><strong>2025-09-15<\/strong>: Vulnerability details have been transmitted through an encrypted channel.<\/li>\n<li><strong>2025-10-07<\/strong>: Asked the vendor for an update.<\/li>\n<li><strong>2025-10-08<\/strong>: Vendor has confirmed the vulnerability and initiated remediation.<\/li>\n<li><strong>2025-11-11<\/strong>: Vendor has asked to extend the disclosure timeline while QA testing and finalizing the patch.<\/li>\n<li><strong>2025-11-11<\/strong>: We agreed to extend the timeline.<\/li>\n<li><strong>2025-11-28<\/strong>:\u00a0The vendor has released a patch (v5.8)<\/li>\n<li><strong>2025-12-01<\/strong>: This advisory is published.<\/li>\n<\/ul>\n<h3>Credits<\/h3>\n<p><!-- add the names of the persons that discovered the vulnerability. This information will be sent to the vendor and published on the HeroLab blog -->This security vulnerability was identified by Florian Dewald, Roman Hergenreder, Florian Kimmes, DR, Jakob Steeg, and Ole Wagner 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-2025-47 | OrangeHRM OS 5.7 - Improper Neutralization of Special Elements used in an OS Command Product: OrangeHRM OSAffected Version: 5.7Vulnerability Type: Improper Neutralization of Special Elements used in an OS Command (CWE-78)Security Risk: CriticalVendor: OrangeHRM IncVendor URL: https:\/\/www.orangehrm.com\/Vendor acknowledged vulnerability: YesVendor Status: FixedCVE Number: CVE-2025-66224CVE Link: https:\/\/www.cve.org\/CVERecord?id=CVE-2025-66224Advisory ID: usd-2025-47 Description OrangeHRM describes itself as [&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-24594","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/24594","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=24594"}],"version-history":[{"count":5,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/24594\/revisions"}],"predecessor-version":[{"id":24702,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/24594\/revisions\/24702"}],"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=24594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}