# CVE-2024-11831: Npm-serialize-javascript: cross-site scripting (xss) in serialize-javascript

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.4
- **CVSS:** 5.4 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: Low; User interaction: Required; Scope: Changed (impact reaches other components); Confidentiality impact: Low; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 1.86% (percentile 80, 2026-11-28)
- **CWE:** CWE-79
- **Aliases:** GHSA-76p7-773f-r4q5
- **Published:** 2025-02-10T15:27:46.732Z
- **Modified:** 2026-11-26T18:17:13.013Z

## Who should check

- Projects that depend on npm package serialize-javascript (\>= 6.0.0, \< 6.0.2)
- Anyone running serialize-javascript \>= 6.0, \< 6.0.2
- Anyone running Red Hat Advanced Cluster Security 4.4 all versions
- Anyone running Red Hat Advanced Cluster Security 4.5 all versions
- Anyone running Red Hat Ceph Storage 7.1 all versions
- Anyone running Red Hat Ceph Storage 8.1 all versions
- Anyone running Red Hat Ceph Storage 9.0 all versions
- Anyone running Red Hat Enterprise Linux 8 all versions

## Description

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.

## Affected and fixed versions

- npm `serialize-javascript`: affected \>= 6.0.0, \< 6.0.2; fixed 6.0.2 (osv)
- serialize-javascript: \>= 6.0, \< 6.0.2 (cvelist)
- Red Hat Advanced Cluster Security 4.4: all versions (cvelist)
- Red Hat Advanced Cluster Security 4.5: all versions (cvelist)
- Red Hat Ceph Storage 7.1: all versions (cvelist)
- Red Hat Ceph Storage 8.1: all versions (cvelist)
- Red Hat Ceph Storage 9.0: all versions (cvelist)
- Red Hat Enterprise Linux 8: all versions (cvelist)
- Red Hat Enterprise Linux 9: all versions (cvelist)
- Red Hat RHODF-4.14-RHEL-9: all versions (cvelist)
- Red Hat RHODF-4.14-RHEL-9: all versions (cvelist)
- Red Hat RHODF-4.14-RHEL-9: all versions (cvelist)
- Red Hat RHODF-4.15-RHEL-9: all versions (cvelist)
- Red Hat RHODF-4.15-RHEL-9: all versions (cvelist)
- Red Hat RHODF-4.15-RHEL-9: all versions (cvelist)
- Red Hat RHODF-4.16-RHEL-9: all versions (cvelist)
- Red Hat RHODF-4.16-RHEL-9: all versions (cvelist)
- Red Hat RHODF-4.16-RHEL-9: all versions (cvelist)
- Red Hat RHODF-4.17-RHEL-9: all versions (cvelist)
- Red Hat RHODF-4.17-RHEL-9: all versions (cvelist)
- Red Hat RHODF-4.17-RHEL-9: all versions (cvelist)
- Red Hat RHODF-4.18-RHEL-9: all versions (cvelist)
- Red Hat RHODF-4.18-RHEL-9: all versions (cvelist)
- Red Hat RHODF-4.18-RHEL-9: all versions (cvelist)
- Red Hat Ceph Storage 7.1: all versions (cvelist)
- Red Hat Ceph Storage 8: all versions (cvelist)
- Red Hat Ceph Storage 8.1: all versions (cvelist)
- Red Hat Ceph Storage 9.0: all versions (cvelist)
- Red Hat OpenShift Pipelines 1.14.6: all versions (cvelist)
- Red Hat OpenShift Pipelines 1.15: all versions (cvelist)
- Red Hat OpenShift Pipelines 1.15: all versions (cvelist)
- Red Hat OpenShift Pipelines 1.16: all versions (cvelist)
- Red Hat OpenShift Pipelines 1.16: all versions (cvelist)
- Red Hat OpenShift Pipelines 1.17: all versions (cvelist)
- Red Hat OpenShift Pipelines 1.17: all versions (cvelist)
- Red Hat OpenShift Pipelines 1.18.0: all versions (cvelist)
- Red Hat OpenShift Pipelines 1.19: all versions (cvelist)
- Red Hat Cryostat 3: all versions (cvelist)
- Logging Subsystem for Red Hat OpenShift: all versions (cvelist)
- Red Hat Migration Toolkit for Virtualization: see vendor advisory (cvelist)
- .NET 6.0 on Red Hat Enterprise Linux: see vendor advisory (cvelist)
- Red Hat OpenShift Lightspeed: all versions (cvelist)
- Red Hat OpenShift Pipelines: all versions (cvelist)
- Red Hat OpenShift Pipelines: all versions (cvelist)
- Red Hat OpenShift Serverless: all versions (cvelist)
- Red Hat OpenShift Service Mesh 2: all versions (cvelist)
- Red Hat OpenShift Service Mesh 2: all versions (cvelist)
- Red Hat 3scale API Management Platform 2: all versions (cvelist)
- Red Hat Advanced Cluster Management for Kubernetes 2: see vendor advisory (cvelist)
- Red Hat Advanced Cluster Security 4: see vendor advisory (cvelist)
- Red Hat Advanced Cluster Security 4: see vendor advisory (cvelist)
- Red Hat Advanced Cluster Security 4: see vendor advisory (cvelist)
- Red Hat Advanced Cluster Security 4: see vendor advisory (cvelist)
- Red Hat Advanced Cluster Security 4: see vendor advisory (cvelist)
- Red Hat Ansible Automation Platform 2: all versions (cvelist)
- Red Hat Ansible Automation Platform 2: all versions (cvelist)
- Red Hat Ansible Automation Platform 2: see vendor advisory (cvelist)
- Red Hat Ansible Automation Platform 2: see vendor advisory (cvelist)
- Red Hat build of Apache Camel - HawtIO 4: see vendor advisory (cvelist)
- Red Hat build of Apicurio Registry 2: all versions (cvelist)
- Red Hat build of OptaPlanner 8: all versions (cvelist)
- Red Hat Ceph Storage 7: see vendor advisory (cvelist)
- Red Hat Ceph Storage 7: all versions (cvelist)
- Red Hat Ceph Storage 7: see vendor advisory (cvelist)
- Red Hat Ceph Storage 8: see vendor advisory (cvelist)
- Red Hat Ceph Storage 8: all versions (cvelist)
- Red Hat Ceph Storage 8: all versions (cvelist)
- Red Hat Ceph Storage 9: all versions (cvelist)
- Red Hat Ceph Storage 9: all versions (cvelist)
- Red Hat Ceph Storage 9: all versions (cvelist)
- Red Hat Data Grid 8: all versions (cvelist)
- Red Hat Developer Hub 1: see vendor advisory (cvelist)
- Red Hat Discovery 1: all versions (cvelist)
- Red Hat Enterprise Linux 10: see vendor advisory (cvelist)
- Red Hat Enterprise Linux 8: all versions (cvelist)
- Red Hat Enterprise Linux 8: all versions (cvelist)
- Red Hat Enterprise Linux 8: see vendor advisory (cvelist)
- Red Hat Enterprise Linux 9: see vendor advisory (cvelist)
- Red Hat Enterprise Linux 9: see vendor advisory (cvelist)
- Red Hat Enterprise Linux 9: see vendor advisory (cvelist)
- Red Hat Fuse 7: all versions (cvelist)
- Red Hat Integration Camel K 1: see vendor advisory (cvelist)
- Red Hat JBoss Enterprise Application Platform 7: see vendor advisory (cvelist)
- Red Hat JBoss Enterprise Application Platform 8: see vendor advisory (cvelist)
- Red Hat JBoss Enterprise Application Platform Expansion Pack: see vendor advisory (cvelist)
- Red Hat OpenShift AI (RHOAI): see vendor advisory (cvelist)
- Red Hat OpenShift AI (RHOAI): all versions (cvelist)
- Red Hat OpenShift AI (RHOAI): all versions (cvelist)
- Red Hat OpenShift AI (RHOAI): all versions (cvelist)
- Red Hat OpenShift AI (RHOAI): all versions (cvelist)
- Red Hat OpenShift AI (RHOAI): all versions (cvelist)
- Red Hat OpenShift AI (RHOAI): all versions (cvelist)
- Red Hat OpenShift AI (RHOAI): all versions (cvelist)
- Red Hat OpenShift AI (RHOAI): all versions (cvelist)
- Red Hat OpenShift AI (RHOAI): see vendor advisory (cvelist)
- Red Hat OpenShift AI (RHOAI): see vendor advisory (cvelist)
- Red Hat OpenShift AI (RHOAI): see vendor advisory (cvelist)
- Red Hat OpenShift AI (RHOAI): see vendor advisory (cvelist)
- Red Hat OpenShift Container Platform 3.11: all versions (cvelist)
- Red Hat OpenShift Container Platform 4: see vendor advisory (cvelist)
- Red Hat OpenShift Dev Spaces: see vendor advisory (cvelist)
- Red Hat OpenShift Dev Spaces: all versions (cvelist)
- Red Hat OpenShift Dev Spaces: see vendor advisory (cvelist)
- Red Hat OpenShift distributed tracing 3: see vendor advisory (cvelist)
- Red Hat OpenShift distributed tracing 3: all versions (cvelist)
- Red Hat OpenShift distributed tracing 3: see vendor advisory (cvelist)
- Red Hat OpenShift distributed tracing 3: see vendor advisory (cvelist)
- Red Hat OpenShift distributed tracing 3: see vendor advisory (cvelist)
- Red Hat OpenShift distributed tracing 3: see vendor advisory (cvelist)
- Red Hat OpenShift distributed tracing 3: all versions (cvelist)
- Red Hat Process Automation 7: all versions (cvelist)
- Red Hat Quay 3: all versions (cvelist)
- Red Hat Satellite 6: see vendor advisory (cvelist)
- Red Hat Satellite 6: see vendor advisory (cvelist)
- Red Hat Single Sign-On 7: all versions (cvelist)
- Red Hat Trusted Profile Analyzer: all versions (cvelist)

## Mitigation

- Upgrade serialize-javascript to 6.0.2 or later.
- Vendor workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-11831. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-11831.md
Affected: serialize-javascript >= 6.0.0, < 6.0.2
Fixed in: 6.0.2

Steps:
1. Search this machine and project for serialize-javascript (npm), serialize-javascript, Red Hat Advanced Cluster Security 4.4, Red Hat Advanced Cluster Security 4.5, Red Hat Ceph Storage 7.1, Red Hat Ceph Storage 8.1: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-11831 being exploited?

There is no confirmed exploitation: CVE-2024-11831 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.86% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2024-11831?

Medium: CVSS 5.4 (v3.1, scored by CNA). Remote, login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2024-11831?

serialize-javascript \>= 6.0.0, \< 6.0.2.

### Is there a fix for CVE-2024-11831?

Yes. Fixed in 6.0.2. Upgrade serialize-javascript to 6.0.2 or later. Vendor workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

### How do I check if I'm affected by CVE-2024-11831?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://access.redhat.com/errata/RHBA-2025:0304>
- vendor: <https://access.redhat.com/errata/RHSA-2025:0381>
- vendor: <https://access.redhat.com/errata/RHSA-2025:10853>
- vendor: <https://access.redhat.com/errata/RHSA-2025:1334>
- vendor: <https://access.redhat.com/errata/RHSA-2025:1468>
- vendor: <https://access.redhat.com/errata/RHSA-2025:21068>
- vendor: <https://access.redhat.com/errata/RHSA-2025:21203>
- vendor: <https://access.redhat.com/errata/RHSA-2025:3870>
- vendor: <https://access.redhat.com/errata/RHSA-2025:4511>
- vendor: <https://access.redhat.com/errata/RHSA-2025:8059>
- vendor: <https://access.redhat.com/errata/RHSA-2025:8078>
- vendor: <https://access.redhat.com/errata/RHSA-2025:8233>
- vendor: <https://access.redhat.com/errata/RHSA-2025:8479>
- vendor: <https://access.redhat.com/errata/RHSA-2025:8512>
- vendor: <https://access.redhat.com/errata/RHSA-2025:8544>
- vendor: <https://access.redhat.com/errata/RHSA-2025:8551>
- vendor: <https://access.redhat.com/errata/RHSA-2025:9294>
- vendor: <https://access.redhat.com/errata/RHSA-2026:1536>
- vendor: <https://access.redhat.com/errata/RHSA-2026:2769>
- vendor: <https://access.redhat.com/errata/RHSA-2026:62115>
- vendor: <https://access.redhat.com/errata/RHSA-2026:83548>
- vendor: <https://access.redhat.com/errata/RHSA-2026:8568>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2024-11831>
- patch: <https://github.com/yahoo/serialize-javascript/commit/f27d65d3de42affe2aac14607066c293891cec4e>
- patch: <https://github.com/yahoo/serialize-javascript/pull/173>
- patch: <https://github.com/yahoo/serialize-javascript/commit/7f3ac252d86b802454cb43782820aea2e0f6dc25>
- other: <https://access.redhat.com/security/cve/CVE-2024-11831>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=2312579>
- other: <https://github.com/yahoo/serialize-javascript>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-11831>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-76p7-773f-r4q5> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2024-11831> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-11831>
