Advisory

GHSA-76p7-773f-r4q5

Also known as: CVE-2024-11831

Summary

Cross-site Scripting (XSS) in serialize-javascript

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2025-02-10 18:30 UTC
Modified
2026-10-15 21:45 UTC

Affected packages and fixes

serialize-javascript

npm · All systems

Affected

  • introduced 6.0.0, fixed 6.0.2 (semver)

Fixed versions

6.0.2

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences