NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

CVE-2019-16769 — serialize-javascript

MEDIUM

CVE-2019-16769 is a medium-severity (CVSS 5.4) Cross-site Scripting (XSS) vulnerability in serialize-javascript. A fix is available for serialize-javascript — see the affected versions and patch details below.

Cross-Site Scripting in serialize-javascript

Also known asGHSA-h9rv-jmmf-4pgx
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 8, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.8%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs57th percentile — riskier than 57% of all scored CVEsHighest risk
0.00%0.49%0.98%1.48%0.4%0.8%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

2Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
serialize-javascriptnpm
58.9Mdownloads / week

Description

The serialize-javascript npm package before version 2.1.1 is vulnerable to Cross-site Scripting (XSS). It does not properly mitigate against unsafe characters in serialized regular expressions. This vulnerability is not affected on Node.js environment since Node.js's implementation of RegExp.prototype.toString() backslash-escapes all forward slashes in regular expressions. If serialized data of regular expression objects are used in an environment other than Node.js, it is affected by this vulnerability.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmserialize-javascriptall versions2.1.1npm install serialize-javascript@2.1.1

Affected Products

1 product · 1 configurations
Application
serialize-javascriptverizon
< 2.1.1
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for serialize-javascript, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update serialize-javascript to 2.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2019-16769 is resolved across your whole dependency graph.

  3. Workarounds

    Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

In both OpenShift Container Platform (OCP) and OpenShift ServiceMesh (OSSM), the grafana and prometheus containers are behind OpenShift OAuth authentication. This restricts access to the vulnerable serialize-javascript library to authenticated users only, therefore the impact is low.

ProductFixed inAdvisory
OpenShift Service Mesh 1.1servicemesh-grafana-0:6.4.3-11.el8RHSA-2020:2796
Red Hat OpenShift Container Platform 4.6openshift4/ose-grafana:v4.6.0-202010061132.p0RHSA-2020:4298

Frequently Asked Questions

The serialize-javascript npm package before version 2.1.1 is vulnerable to Cross-site Scripting (XSS). It does not properly mitigate against unsafe characters in serialized regular expressions. This vulnerability is not affected on Node.js environment since Node.js's implementation of RegExp.prototype.toString() backslash-escapes all forward slashes in regular expressions. If serialized data of regular expression objects are used in an environment other than Node.js, it is affected by this vulnerability.
O3 Security · Impact-Aware SCA

Is CVE-2019-16769 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2019-16769: serialize-javascript XSS — Fixed in 2.1.1