CVE-2024-11831
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.
How to fix
- serialize-javascript6.0.2 or later
- access.redhat.com/errata/RHBA-2025:0304
- access.redhat.com/errata/RHSA-2025:0381
- access.redhat.com/errata/RHSA-2025:10853
- access.redhat.com/errata/RHSA-2025:1334
- access.redhat.com/errata/RHSA-2025:1468
- access.redhat.com/errata/RHSA-2025:21068
- access.redhat.com/errata/RHSA-2025:21203
- access.redhat.com/errata/RHSA-2025:3870
- access.redhat.com/errata/RHSA-2025:4511
- access.redhat.com/errata/RHSA-2025:8059
- access.redhat.com/errata/RHSA-2025:8078
- access.redhat.com/errata/RHSA-2025:8233
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| serialize-javascriptnpm | 6.0.0 ≤ v < 6.0.2 | 6.0.2 |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.