CVE-2021-43616 json
The npm ci command in npm 7.x and 8.x through 8.1.3 proceeds with an installation even if dependency information in package-lock.json diffe…
published 2021-11-13 4 y ago modified 2026-06-17 4 mo ago also EUVD-2021-30530
- cvss
- 9.0
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.6%
- EPSS 2.6% chance of exploitation in 30 days, percentile 85%
- public exploits
- 0
- none known
Summary
The npm ci command in npm 7.x and 8.x through 8.1.3 proceeds with an installation even if dependency information in package-lock.json differs from package.json. This behavior is inconsistent with the documentation, and makes it easier for attackers to install malware that was supposed to have been blocked by an exact version match requirement in package-lock.json. NOTE: The npm team believes this is not a vulnerability. It would require someone to socially engineer package.json which has different dependencies than package-lock.json. That user would have to have file system or write access to change dependencies. The npm team states preventing malicious actors from socially engineering or gaining file system access is outside the scope of the npm CLI.
Patch / fix
- npm Debian 14, Debian 13, Debian 12 8.4.1~ds-1
debian advisories DEBIAN-CVE-2021-43616
- npm RHEL 8 1:8.3.1-1.16.14.0.4.module+el8.6.0+15294+54b291d2
- nodejs RHEL 8 1:16.14.0-4.module+el8.6.0+15294+54b291d2
- nodejs-nodemon RHEL 8 2.0.15-1.module+el8.6.0+15294+54b291d2
- nodejs-full-i18n RHEL 8 1:16.14.0-4.module+el8.6.0+15294+54b291d2
- nodejs-packaging RHEL 8 25-1.module+el8.5.0+10992+fac5fe06
red hat advisories RHSA-2022:4796
- npm AlmaLinux 8 1:8.3.1-1.16.14.0.4.module_el8.6.0+2904+f21ad6f4
- nodejs AlmaLinux 8 1:16.14.0-4.module_el8.6.0+2904+f21ad6f4
- nodejs-nodemon AlmaLinux 8 2.0.15-1.module_el8.6.0+2904+f21ad6f4
- nodejs-nodemon AlmaLinux 8 2.0.15-1.module_el8.5.0+2605+45d748af
- nodejs-full-i18n AlmaLinux 8 1:16.14.0-4.module_el8.6.0+2904+f21ad6f4
- nodejs-packaging AlmaLinux 8 25-1.module_el8.5.0+246+05401605
- nodejs-packaging AlmaLinux 8 25-1.module_el8.5.0+2605+45d748af
almalinux advisories ALSA-2022:4796
- nodejs Rocky Linux 8 1:16.14.0-4.module+el8.6.0+978+59f26232
- nodejs-nodemon Rocky Linux 8 2.0.15-1.module+el8.5.0+721+4c107270
- nodejs-packaging Rocky Linux 8 25-1.module+el8.6.0+1046+80feca58
- nodejs-packaging Rocky Linux 8 25-1.module+el8.5.0+702+221f14e6
rocky linux advisories RLSA-2022:4796
- npm Alpine 3.24, Alpine 3.23, Alpine 3.22 +6 more 8.1.4-r0
alpine advisories ALPINE-CVE-2021-43616
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- npm Arch Linux 8.4.1-1
arch linux advisories AVG-2554
- github.com/npm/cli@457e0ae commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-43616 updated cvss 8.1
npm: npm ci succeeds when package-lock.json doesn't match package.json
-
Red Hat Enterprise Linux AppStream (v. 8) nodejs 16.14.0-4.module+el8.6.0+15294+54b291d2, nodejs-packaging 25-1.module+el8.5.0+10992+fac5fe06, npm 8.3.1-1.16.14.0.4.module+el8.6.0+15294+54b291d2, nodejs-nodemon 2.0.15-1.module+el8.6.0+15294+54b291d2, nodejs-full-i18n 16.14.0-4.module+el8.6.0+15294+54b291d2fixed: vendor fix “Red Hat has investigated whether possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.” RHSA-2022:4796
-
Red Hat Enterprise Linux 8 npm, nodejs, nodejs-libs, nodejs-nodemon, nodejs-full-i18n, nodejs-packaging, +1 more Red Hat Enterprise Linux 9 npm, nodejs, nodejs-libs, nodejs-full-i18n Red Hat Quay 3 nodejs Red Hat Software Collections rh-nodejs12-npm, rh-nodejs14-npm, rh-nodejs12-nodejs, rh-nodejs14-nodejs, rh-nodejs14-nodejs-full-i18nnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
2.62% chance of exploitation in the next 30 days, higher than 85% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/npm/cli/issues/2701 referenced PoC, tagged "exploit" by a source, unverified
- medium.com https://medium.com/cider-sec/this-time-we-were-lucky-85c0dcac94a0 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 9.0 | CVSS:3.1/AC:H/AV:N/A:H/C:H/I:H/PR:N/S:C/UI:N |
| CNA | 3.1 | 9.0 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Classification
- Weakness
-
- CWE-345 Insufficient Verification of Data Authenticity
References
-
github.com
/npm/cli/commit/457e0ae61bbc55846f5af44afa4066921923490f
patch, third-party-advisory
-
github.com
/npm/cli/issues/2701
exploit, issue-tracking, third-party-advisory
-
medium.com
/cider-sec/this-time-we-were-lucky-85c0dcac94a0
exploit, third-party-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/NXNVFKOF5ZYH5NIRWHKN6O6UBCHDV6FE/
vendor-advisory
-
docs.npmjs.com
/cli/v7/commands/npm-ci
product, vendor-advisory
-
github.com
/icatalina/CVE-2021-43616
third-party-advisory
-
security.netapp.com
/advisory/ntap-20211210-0002/
third-party-advisory
- docs.npmjs.com /cli/v8/commands/npm-ci
- github.com /npm/cli/issues/2701#issuecomment-979054224
- github.com /npm/cli/issues/2701#issuecomment-972900511
Sources
- CVE List CVE-2021-43616
- NVD CVE-2021-43616
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.