CVE-2025-49137: Elmsln/haxcms Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-2vc4-3hx7-v7v7
CVSS 8.5
CWE-87 CWE-80 CWE-79
Published
Advisory Summary

CVE-2025-49137 is a HIGH (CVSS 8.5) cross-site scripting vulnerability (CWE-87: Improper Neutralization of Alternate XSS Syntax) affecting Elmsln/haxcms libraries in the Packagist ecosystem. The issue involves hax cms stored cross-site scripting vulnerability. Remediation is available by upgrading affected packages to version 11.0.0.

CVE-2025-49137 at a Glance

CVE Identifier CVE-2025-49137
GHSA Identifier GHSA-2vc4-3hx7-v7v7
Severity HIGH
CVSS v3.1 Base Score 8.5
CWE Classification CWE-87: Improper Neutralization of Alternate XSS Syntax
Affected Product Elmsln/haxcms
Package Ecosystem Packagist
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:L/PR:L/UI:N/S:C/C:H/I:L/A:N).

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

How to Fix CVE-2025-49137

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

elmsln/haxcms fixed: 11.0.0
Upgrade elmsln/haxcms to 11.0.0
Verify Direct and Transitive Dependencies

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

inspect dependencies for elmsln/haxcms

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-49137, inspect your project dependencies for Elmsln/haxcms:

inspect dependencies for elmsln/haxcms

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-87: Improper Neutralization of Alternate XSS Syntax, where the product does not neutralize or incorrectly neutralizes user-controlled input for alternate script syntax. In Elmsln/haxcms, 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 application does not sufficiently sanitize user input, allowing for the execution of arbitrary JavaScript code. The 'saveNode' and 'saveManifest' endpoints take user input and store it in the JSON schema for the site. This content is then rendered in the generated HAX site. Although the application does not allow users to supply a 'script' tag, it does allow the use of other HTML tags to run JavaScript. ### Affected Resources - [Operations.php:258](https://github.com/haxtheweb/haxcms-php/blob/master/system/backend/php/lib/Operations.php#L258) `saveManifest()` - [Operations.php:868](https://github.com/haxtheweb/haxcms-php/blob/master/system/backend/php/lib/Operations.php#L868) `saveNode()` - `https://<site>/<user>/system/api/saveNode` - `https://<site>/<user>/system/api/saveManifest` ### Impact An authenticated attacker can use the site editor and settings editor to store malicious payloads in a HAX site which execute arbitrary JavaScript when a user visits the site. This can be used to steal a user's session cookie or other sensitive data. ### PoCs #### saveNode To replicate this vulnerability, an attacker can use the "View Source" functionality within the site editor to enter a malicious payload. 1. Select "View Source" within the HAX site editor and enter an XSS payload that does not use the "script" HTML tag. ![image](https://github.com/user-attachments/assets/c22c52e6-079a-4add-94a2-b51b1a925a96) 3. Select "Update HTML" and observe the resulting alert. ![image](https://github.com/user-attachments/assets/df2da026-de47-4f65-bbc2-c4dbc8fb77e5) ![image](https://github.com/user-attachments/assets/d593418c-73c6-4210-953e-faca8405174c) #### saveManifest To exploit the 'SaveManifest' endpoint, an attacker can insert executable code into the URL field of the site settings editor: any payload added this way will execute when the site is loaded. 1. Open the site settings editor. ![image](https://github.com/user-attachments/assets/f7faa998-58ec-4085-9c65-d6a9f3831587) 3. Add JavaScript code to the URL field under the "Theme" header. ![image](https://github.com/user-attachments/assets/a99a7238-bb63-408c-8ca7-22deaffeca83) 5. Reload the page to run the script. ![image](https://github.com/user-attachments/assets/e634b1f3-58c1-44f6-8c8a-814773e69e83) 7. The resulting page source will contain the script. ![image](https://github.com/user-attachments/assets/a022d9d2-a6bf-41ad-a9f2-44a6a2f0fa07)

CVE-2025-49137 Affected Elmsln/haxcms Versions

1 component(s)
Fixed Versions:
11.0.0
Product / Package Ecosystem Affected Versions Fixed Version
elmsln/haxcms
Packagist
< 11.0.0
11.0.0

References

Frequently Asked Questions

What is CVE-2025-49137?
CVE-2025-49137 is a security vulnerability in Elmsln/haxcms involving Hax CMS Stored Cross-Site Scripting vulnerability under CWE-87: Improper Neutralization of Alternate XSS Syntax.
Which Elmsln/haxcms versions are affected?
Affected versions include releases prior to 11.0.0 across affected packages: elmsln/haxcms.
What version fixes CVE-2025-49137?
Upgrading to 11.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is elmsln/haxcms affected?
Yes, elmsln/haxcms is affected in releases prior to 11.0.0. Upgrade your dependency to 11.0.0 or later.
What is the CVSS score of CVE-2025-49137?
CVE-2025-49137 has a CVSS v3.1 base score of 8.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N.
What CWE is associated with CVE-2025-49137?
CVE-2025-49137 is classified under CWE-87: Improper Neutralization of Alternate XSS Syntax (The product does not neutralize or incorrectly neutralizes user-controlled input for alternate script syntax.).
How can I check Packagist dependencies for CVE-2025-49137?
Run the dependency tree command: 'inspect dependencies for elmsln/haxcms'. 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-2vc4-3hx7-v7v7",
  "modified" : "2025-06-09T21:43:59Z",
  "published" : "2025-06-09T17:43:37Z",
  "aliases" : [ "CVE-2025-49137" ],
  "summary" : "Hax CMS Stored Cross-Site Scripting vulnerability",
  "details" : "### Summary\n\nThe application does not sufficiently sanitize user input, allowing for the execution of arbitrary JavaScript code. The 'saveNode' and 'saveManifest' endpoints take user input and store it in the JSON schema for the site. This content is then rendered in the generated HAX site.\n\nAlthough the application does not allow users to supply a 'script' tag, it does allow the use of other HTML tags to run JavaScript.\n\n### Affected Resources\n\n- [Operations.php:258](https://github.com/haxtheweb/haxcms-php/blob/master/system/backend/php/lib/Operations.php#L258) `saveManifest()`\n- [Operations.php:868](https://github.com/haxtheweb/haxcms-php/blob/master/system/backend/php/lib/Operations.php#L868) `saveNode()`\n- `https://<site>/<user>/system/api/saveNode`\n- `https://<site>/<user>/system/api/saveManifest`\n\n### Impact\n\nAn authenticated attacker can use the site editor and settings editor to store malicious payloads in a HAX site which execute arbitrary JavaScript when a user visits the site. This can be used to steal a user's session cookie or other sensitive data.\n\n### PoCs\n\n#### saveNode\n\nTo replicate this vulnerability, an attacker can use the \"View Source\" functionality within the site editor to enter a malicious payload.\n\n1. Select \"View Source\" within the HAX site editor and enter an XSS payload that does not use the \"script\" HTML tag.\n\n![image](https://github.com/user-attachments/assets/c22c52e6-079a-4add-94a2-b51b1a925a96)\n\n3. Select \"Update HTML\" and observe the resulting alert.\n\n![image](https://github.com/user-attachments/assets/df2da026-de47-4f65-bbc2-c4dbc8fb77e5)\n\n![image](https://github.com/user-attachments/assets/d593418c-73c6-4210-953e-faca8405174c)\n\n#### saveManifest\n\nTo exploit the 'SaveManifest' endpoint, an attacker can insert executable code into the URL field of the site settings editor: any payload added this way will execute when the site is loaded.\n\n1. Open the site settings editor.\n\n![image](https://github.com/user-attachments/assets/f7faa998-58ec-4085-9c65-d6a9f3831587)\n\n3. Add JavaScript code to the URL field under the \"Theme\" header.\n\n![image](https://github.com/user-attachments/assets/a99a7238-bb63-408c-8ca7-22deaffeca83)\n\n5. Reload the page to run the script.\n\n![image](https://github.com/user-attachments/assets/e634b1f3-58c1-44f6-8c8a-814773e69e83)\n\n7. The resulting page source will contain the script.\n\n![image](https://github.com/user-attachments/assets/a022d9d2-a6bf-41ad-a9f2-44a6a2f0fa07)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "elmsln/haxcms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "11.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/haxtheweb/issues/security/advisories/GHSA-2vc4-3hx7-v7v7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-49137"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/haxtheweb/haxcms-php/commit/0dd3e98fe2fadd0793b667d4af2aac230980e0f8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/haxtheweb/issues"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79", "CWE-80", "CWE-87" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-09T17:43:37Z",
    "nvd_published_at" : "2025-06-09T21:15:46Z"
  }
}