CVE-2021-3918 is a critical-severity (CVSS 9.8) CWE-1321 vulnerability in json-schema. 1 public exploit reference exists, so weaponization risk is real. A fix is available for json-schema — see the affected versions and patch details below.
json-schema is vulnerable to Prototype Pollution
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2021-3918 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 395,249 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
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.
json-schemanpmDescription
json-schema before version 0.4.0 is vulnerable to Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | json-schema | all versions | 0.4.0npm install json-schema@0.4.0 |
Affected Products
debian linuxdebianjson-schemajson-schema_projectResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for json-schema, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update json-schema to 0.4.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-3918 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
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.
npm versions 8.0.0 and older provide a vulnerable version of the json-schema library. However, it is currently believed that in the context of npm, it is not possible to take advantage of the vulnerability. Red Hat Enterprise Linux version 8 and Software Collections provide a vulnerable version of the json-schema…
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Enterprise Linux 8 | nodejs:12-8060020220523160029.ad008a3a | RHEA-2022:5139 |
| Red Hat Enterprise Linux 8 | nodejs:16-8050020211206113934.c5368500 | RHSA-2021:5171 |
| Red Hat Enterprise Linux 8 | nodejs:14-8050020211213115342.c5368500 | RHSA-2022:0350 |
| Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions | nodejs:12-8010020220518102644.c27ad7f8 | RHEA-2022:4925 |
| Red Hat Enterprise Linux 8.2 Extended Update Support | nodejs:12-8020020220523154454.4cda2c84 | RHEA-2022:5221 |
| Red Hat Enterprise Linux 8.4 Extended Update Support | nodejs:12-8040020220523155137.522a0ee4 | RHEA-2022:5615 |
| Red Hat Enterprise Linux 8.4 Extended Update Support | nodejs:14-8040020211213111158.522a0ee4 | RHSA-2022:0246 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7 | rh-nodejs14-nodejs-0:14.18.2-1.el7 | RHSA-2022:0041 |
Frequently Asked Questions
Is CVE-2021-3918 in your dependencies?
Find it across npm, including transitive dependencies.