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

CVE-2020-7660 — serialize-javascript

HIGHFix: yahoo/serialize-javascript@f21a6fb

CVE-2020-7660 is a high-severity (CVSS 8.1) Deserialization of Untrusted Data vulnerability in serialize-javascript. A fix is available for serialize-javascript — see the affected versions and patch details below.

Insecure serialization leading to RCE in serialize-javascript

Also known asGHSA-hxcc-f52p-wc94
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 3, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
3.0%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs87th percentile — riskier than 87% of all scored CVEsHighest risk
2.10%2.57%3.04%3.51%2.9%3.0%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
60.3Mdownloads / week

Description

serialize-javascript prior to 3.1.0 allows remote attackers to inject arbitrary code via the function "deleteFunctions" within "index.js".

An object such as {"foo": /1"/, "bar": "a\"@__R-<UID>-0__@"} was serialized as {"foo": /1"/, "bar": "a\/1"/}, which allows an attacker to escape the bar key. This requires the attacker to control the values of both foo and bar and guess the value of <UID>. The UID has a keyspace of approximately 4 billion making it a realistic network attack.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmserialize-javascriptall versions3.1.0npm install serialize-javascript@3.1.0

Affected Products

1 product · 1 configurations
Application
serialize-javascriptverizon
< 3.1.0
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 3.1.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-7660 is resolved across your whole dependency graph.

  3. Workarounds

    Do not deserialise data from untrusted sources: where the format allows it, restrict deserialisation to an explicit allowlist of expected types, and prefer a data-only format (JSON, Protobuf) over one that can reconstruct arbitrary objects until you can upgrade.

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 HatImportant

Red Hat Quay includes serialize-javascript as a dependency of webpack which is only used at build time. The vulnerable library is not used at runtime meaning this has a low impact on Red Hat Quay. The currently supported versions of Container Native Virtualization 2 are not affected by this flaw. However, version 2.0,…

ProductFixed inAdvisory
OpenShift Service Mesh 1.0servicemesh-grafana-0:6.2.2-38.el8RHSA-2020:2861
OpenShift Service Mesh 1.1servicemesh-grafana-0:6.4.3-11.el8RHSA-2020:2796

Frequently Asked Questions

serialize-javascript prior to 3.1.0 allows remote attackers to inject arbitrary code via the function "deleteFunctions" within "index.js". An object such as `{"foo": /1"/, "bar": "a\"@__R-<UID>-0__@"}` was serialized as `{"foo": /1"/, "bar": "a\/1"/}`, which allows an attacker to escape the `bar` key. This requires the attacker to control the values of both `foo` and `bar` and guess the value of `<UID>`. The UID has a keyspace of approximately 4 billion making it a realistic network attack.
O3 Security · Impact-Aware SCA

Is CVE-2020-7660 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2020-7660: serialize-javascript RCE — Fixed in 3.1.0