CVE-2026-48527: @haxtheweb/haxcms nodejs Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-g2g8-95qg-v35h
CVSS 8.7
CWE-79
Published
Advisory Summary

CVE-2026-48527 is a HIGH (CVSS 8.7) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting @haxtheweb/haxcms nodejs libraries in the npm ecosystem. The issue involves haxcms has a stored cross-site scripting (xss) bypass in its savenode endpoint. Remediation is available by upgrading affected packages to version 26.0.1.

CVE-2026-48527 at a Glance

CVE Identifier CVE-2026-48527
GHSA Identifier GHSA-g2g8-95qg-v35h
Severity HIGH
CVSS v3.1 Base Score 8.7
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product @haxtheweb/haxcms nodejs
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.7

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:R/S:C/C:H/I:H/A:N).

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

How to Fix CVE-2026-48527

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: 26.0.1
npm install @haxtheweb/haxcms-nodejs@26.0.1
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-2026-48527, 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 26.0.1), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. 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 HaxCMS is affected by a stored cross-site scripting (XSS) vulnerability in the `/system/api/saveNode` endpoint. An authenticated user with a permission to edit pages can bypass the HTML sanitizer by injecting an event handler attribute without whitespace before the attribute name. For example, the sanitizer misses: ```html <a href="#"onclick="alert('kn1ph')">click me</a> ``` The important bypass is: ```html href="#"onclick= ``` The payload is stored in the generated page files and executes when a user clicks the injected link. ## Details The issue is caused by regex-based HTML sanitization that expects whitespace before event handler attributes. Because the sanitizer expects a pattern like: ```html href="#" onclick="..." ``` It fails to remove an event handler when it is written without whitespace: ```html href="#"onclick="..." ``` Browsers still parse `onclick` as a valid event handler attribute, so the JavaScript executes when the element is clicked. Affected endpoint: ```text POST /system/api/saveNode?site_token=[VALID_SITE_TOKEN] ``` Affected parameter: ```text node.body ``` ## PoC 1. Log in to HaxCMS and edit any existing page. 2. Capture the page save request in Burp Suite: ```text POST /system/api/saveNode?site_token=[VALID_SITE_TOKEN] ``` 3. In the JSON request body, modify only the `node.body` value. Change: ```json "body":"...existing page content...\n" ``` To: ```json "body":"...existing page content...\n<a href=\"#\"onclick=\"alert('kn1ph')\">click me</a>\n" ``` 5. Forward the request. 6. Open the edited page and click `click me`. Result: The JavaScript will execute and the alert will pop up. It was confirmed that the payload is stored in the generated page files, including `index.html`. ## Impact An authenticated user with permissions to edit the page can inject stored JavaScript into the page content. If a privileged user interacts with the injected element while authenticated, the attacker controlled JavaScript will execute in that user’s browser. Based on local testing, the XSS can access browser-exposed HaxCMS data such as `localStorage.jwt` and `window.appSettings`, including API paths and tokens available to the authenticated user. This may allow an attacker to perform actions as the victim within the limits of the exposed tokens and the victim’s permissions and possibly chain more vulnerabilities.

CVE-2026-48527 Affected @haxtheweb/haxcms nodejs Versions

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

References

Frequently Asked Questions

What is CVE-2026-48527?
CVE-2026-48527 is a security vulnerability in @haxtheweb/haxcms nodejs involving HaxCMS has a stored Cross-Site Scripting (XSS) bypass in its saveNode endpoint under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which @haxtheweb/haxcms nodejs versions are affected?
Affected versions include releases prior to 26.0.1 across affected packages: @haxtheweb/haxcms-nodejs.
What version fixes CVE-2026-48527?
Upgrading to 26.0.1 (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 26.0.1. Upgrade your dependency to 26.0.1 or later.
What is the CVSS score of CVE-2026-48527?
CVE-2026-48527 has a CVSS v3.1 base score of 8.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2026-48527?
CVE-2026-48527 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check npm dependencies for CVE-2026-48527?
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-g2g8-95qg-v35h",
  "modified" : "2026-06-09T10:27:09Z",
  "published" : "2026-05-29T14:07:51Z",
  "aliases" : [ "CVE-2026-48527" ],
  "summary" : "HaxCMS has a stored Cross-Site Scripting (XSS) bypass in its saveNode endpoint",
  "details" : "## Summary\n\nHaxCMS is affected by a stored cross-site scripting (XSS) vulnerability in the `/system/api/saveNode` endpoint. An authenticated user with a permission to edit pages can bypass the HTML sanitizer by injecting an event handler attribute without whitespace before the attribute name.\n\nFor example, the sanitizer misses:\n\n```html\n<a href=\"#\"onclick=\"alert('kn1ph')\">click me</a>\n```\n\nThe important bypass is:\n\n```html\nhref=\"#\"onclick=\n```\n\nThe payload is stored in the generated page files and executes when a user clicks the injected link.\n\n## Details\n\nThe issue is caused by regex-based HTML sanitization that expects whitespace before event handler attributes. Because the sanitizer expects a pattern like:\n\n```html\nhref=\"#\" onclick=\"...\"\n```\n\nIt fails to remove an event handler when it is written without whitespace:\n\n```html\nhref=\"#\"onclick=\"...\"\n```\n\nBrowsers still parse `onclick` as a valid event handler attribute, so the JavaScript executes when the element is clicked.\n\nAffected endpoint:\n\n```text\nPOST /system/api/saveNode?site_token=[VALID_SITE_TOKEN]\n```\n\nAffected parameter:\n\n```text\nnode.body\n```\n\n## PoC\n\n1. Log in to HaxCMS and edit any existing page.\n\n2. Capture the page save request in Burp Suite:\n\n```text\nPOST /system/api/saveNode?site_token=[VALID_SITE_TOKEN]\n```\n3. In the JSON request body, modify only the `node.body` value.\n\nChange:\n```json\n\"body\":\"...existing page content...\\n\"\n```\nTo:\n```json\n\"body\":\"...existing page content...\\n<a href=\\\"#\\\"onclick=\\\"alert('kn1ph')\\\">click me</a>\\n\"\n```\n\n5. Forward the request.\n\n6. Open the edited page and click `click me`.\n\nResult:\n\nThe JavaScript will execute and the alert will pop up. \n\nIt was confirmed that the payload is stored in the generated page files, including `index.html`.\n\n## Impact\n\nAn authenticated user with permissions to edit the page can inject stored JavaScript into the page content. If a privileged user interacts with the injected element while authenticated, the attacker controlled JavaScript will execute in that user’s browser.\n\nBased on local testing, the XSS can access browser-exposed HaxCMS data such as `localStorage.jwt` and `window.appSettings`, including API paths and tokens available to the authenticated user.\n\nThis may allow an attacker to perform actions as the victim within the limits of the exposed tokens and the victim’s permissions and possibly chain more vulnerabilities.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@haxtheweb/haxcms-nodejs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "26.0.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 26.0.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/haxtheweb/issues/security/advisories/GHSA-g2g8-95qg-v35h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-48527"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/haxtheweb/issues"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-29T14:07:51Z",
    "nvd_published_at" : "2026-05-29T13:16:23Z"
  }
}