Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. serialize-javascript
  4. ›
  5. CVE-2024-11831

CVE-2024-11831: Cross-site Scripting (XSS) in serialize-javascript

February 10, 2025 (updated May 6, 2025)

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.

References

  • access.redhat.com/errata/RHBA-2025:0304
  • access.redhat.com/errata/RHSA-2025:1334
  • access.redhat.com/errata/RHSA-2025:1468
  • access.redhat.com/errata/RHSA-2025:4511
  • access.redhat.com/security/cve/CVE-2024-11831
  • bugzilla.redhat.com/show_bug.cgi?id=2312579
  • github.com/advisories/GHSA-76p7-773f-r4q5
  • github.com/yahoo/serialize-javascript
  • github.com/yahoo/serialize-javascript/commit/7f3ac252d86b802454cb43782820aea2e0f6dc25
  • github.com/yahoo/serialize-javascript/commit/f27d65d3de42affe2aac14607066c293891cec4e
  • github.com/yahoo/serialize-javascript/pull/173
  • nvd.nist.gov/vuln/detail/CVE-2024-11831

Code Behaviors & Features

Detect and mitigate CVE-2024-11831 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 6.0.0 before 6.0.2

Fixed versions

  • 6.0.2

Solution

Upgrade to version 6.0.2 or above.

Impact 5.4 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/serialize-javascript/CVE-2024-11831.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:32 +0000.