CVE-2024-11831
JSON

5.4medium

Npm-serialize-javascript: cross-site scripting (xss) in serialize-javascript

Severity
5.4medium CVSS:3.1 by redhat
Exploit likelihood
1.16% (higher than 68% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
redhat
Also known as
GHSA-76p7-773f-r4q5

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

Product or packageVersionsReported by
serialize-javascriptfrom 6.0 before 6.0.2CVE List
advanced-cluster-security/rhacs-main-rhel8Not specified
Not affected: from 4.4.8-2 before *, from 4.5.6-2 before *
CVE List
cephNot specified
Not affected: from 2:18.2.1-381.el8cp before *, from 2:18.2.1-413.el8cp before *, from 2:19.2.1-292.el9cp before *, from 2:19.2.1-405.el9cp before *, from 2:20.1.0-144.el10cp before *
CVE List
libarrowNot specified
Not affected: from 0:23.0.1-5.el9cp before *
CVE List
liborcNot specified
Not affected: from 0:1.8.7-1.el9cp before *
CVE List
thriftNot specified
Not affected: from 0:0.24.0-2.el9cp before *, from 0:0.24.0-1.el9cp before *
CVE List
dotnet8.0Not specified
Not affected: from 0:8.0.112-1.el8_10 before *, from 0:8.0.112-1.el9_5 before *
CVE List
odf4/ocs-client-console-rhel9Not specified
Not affected: from v4.14.18-2 before *, from v4.15.14-2 before *, from v4.16.10-4 before *, from v4.17.7-2 before *, from v4.18.2-8 before *
CVE List
odf4/odf-console-rhel9Not specified
Not affected: from v4.14.18-3 before *, from v4.15.14-2 before *, from v4.16.10-4 before *, from v4.17.7-2 before *, from v4.18.2-7 before *
CVE List
odf4/odf-multicluster-console-rhel9Not specified
Not affected: from v4.14.18-2 before *, from v4.15.14-2 before *, from v4.16.10-3 before *, from v4.17.7-2 before *, from v4.18.2-8 before *
CVE List
rhceph/rhceph-7-rhel9Not specified
Not affected: from 1791452477 before *
CVE List
rhceph/rhceph-8-rhel9Not specified
Not affected: from 8 before *, from 1787550654 before *
CVE List

All scores

redhat5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
GitHub5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

Se encontró una falla en npm-serialize-javascript. La vulnerabilidad ocurre porque el módulo serialize-javascript no depura correctamente ciertas entradas, como expresiones regulares u otros tipos de objetos JavaScript, lo que permite que un atacante inyecte código malicioso. Este código podría ejecutarse cuando un navegador web lo deserialice, lo que causa ataques de cross site scripting (XSS). Este problema es crítico en entornos donde se envían datos serializados a clientes web, lo que potencialmente compromete la seguridad del sitio web o la aplicación web que utiliza este paquete.

References

https://access.redhat.com/errata/RHBA-2025:0304vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:0381vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:10853vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:1334vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:1468vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:21068vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:21203vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:3870vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:4511vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:8059vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:8078vendor-advisory, web
https://access.redhat.com/errata/RHSA-2025:8233vendor-advisory, web

Sources

SourceRecordLicence
CVE ListCVE-2024-11831 changed 2026-12-01CVE Terms of Use
GitHub Advisory DatabaseGHSA-76p7-773f-r4q5 changed 2026-12-01CC-BY-4.0
NVDCVE-2024-11831 changed 2026-11-26Public domain