Npm-serialize-javascript: cross-site scripting (xss) in serialize-javascript
CVE-2024-11831GHSA-76p7-773f-r4q5Published 10 Feb 2025, 15:27 UTC
Real-world risk
1.1/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
5.4
scored by the vendor (CNA), CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from redhat)
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.
Am I affected?
What to do
Update to a fixed version: 6.0.2.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | LowA real low-privileged account | From the CVSS vector | 0.60 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 1.2% chance of exploitation in 30 days (percentile 68), as of 2026-12-02.
The arithmetic
- Prerequisites multiplied together0.420
- Threat T1: Nothing known0.850
- 10 × impact 0.3 × prerequisites 0.42 × threat 0.851.071
- Rounded to one decimal between 0.1 and 101.1
Exploitation and evidence timeline
- 10 Feb 2025 Published
- 2 Dec 2026 Risk 1.1 (cvss fallback)
Weakness
CWE-79
References
- https://access.redhat.com/errata/RHBA-2025:0304redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:0381redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:10853redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:1334redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:1468redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:21068redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:21203redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:3870redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:4511redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:8059redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:8078redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:8233redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:8479redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:8512redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:8544redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:8551redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2025:9294redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:1536redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:2769redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:61939redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:62115redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:83515redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:83548redhat, vendor-advisory
- https://access.redhat.com/errata/RHSA-2026:8568redhat, vendor-advisory
- https://access.redhat.com/security/cve/CVE-2024-11831redhat, vdb-entry
- https://bugzilla.redhat.com/show_bug.cgi?id=2312579issue-tracking, redhat
- https://github.com/yahoo/serialize-javascript/commit/f27d65d3de42affe2aac14607066c293891cec4e
- https://github.com/yahoo/serialize-javascript/pull/173
- https://nvd.nist.gov/vuln/detail/CVE-2024-11831
- https://github.com/yahoo/serialize-javascript/commit/7f3ac252d86b802454cb43782820aea2e0f6dc25
- https://github.com/advisories/GHSA-76p7-773f-r4q5
- CVE-2024-11831 on CVE.org