cve.bz

CVE-2021-43616

9.8 criticalExploit referenceEPSS 2.6%Fix available

Critical (9.8). EPSS 2.6% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
2.6% (unchanged from 2.6% a week ago; 2.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 86th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-345 Insufficient Verification of Data Authenticity
OWASP Top 10
A08:2025 Software or Data Integrity Failures
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-43616 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-43616?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-43616?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-43616 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
npmjs:npmfrom 7.0.0 through 7.24.2
npmjs:npmfrom 8.0.0 through 8.1.3
fedoraproject:fedora35

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14npm8.4.1~ds-1DEBIAN-CVE-2021-43616
Ubuntu22.04:LTS, 24.04:LTS, 25.10 and 2 morenpmno fix listedUBUNTU-CVE-2021-43616
Red Hatenterprise_linux:8::appstreamnodejs, nodejs-docs, nodejs-devel and 3 more1:16.14.0-4.module+el8.6.0+15294+54b291d2RHSA-2022:4796
Red Hatenterprise_linux:8::appstreamnodejs-nodemon0:2.0.15-1.module+el8.6.0+15294+54b291d2RHSA-2022:4796
Red Hatenterprise_linux:8::appstreamnodejs-packaging0:25-1.module+el8.5.0+10992+fac5fe06RHSA-2022:4796
Red Hatenterprise_linux:8::appstreamnpm1:8.3.1-1.16.14.0.4.module+el8.6.0+15294+54b291d2RHSA-2022:4796
AlmaLinux8nodejs, nodejs-docs, nodejs-devel and 1 more1:16.14.0-4.module_el8.6.0+2904+f21ad6f4ALSA-2022:4796
AlmaLinux8nodejs-nodemon2.0.15-1.module_el8.5.0+2605+45d748afALSA-2022:4796
AlmaLinux8nodejs-nodemon2.0.15-1.module_el8.6.0+2904+f21ad6f4ALSA-2022:4796
AlmaLinux8nodejs-packaging25-1.module_el8.5.0+246+05401605ALSA-2022:4796
AlmaLinux8nodejs-packaging25-1.module_el8.5.0+2605+45d748afALSA-2022:4796
AlmaLinux8npm1:8.3.1-1.16.14.0.4.module_el8.6.0+2904+f21ad6f4ALSA-2022:4796
Rocky Linux8nodejs1:16.14.0-4.module+el8.6.0+978+59f26232RLSA-2022:4796
Rocky Linux8nodejs-nodemon0:2.0.15-1.module+el8.5.0+721+4c107270RLSA-2022:4796
Rocky Linux8nodejs-packaging0:25-1.module+el8.5.0+702+221f14e6RLSA-2022:4796
Rocky Linux8nodejs-packaging0:25-1.module+el8.6.0+1046+80feca58RLSA-2022:4796
Alpinev3.16, v3.17, v3.18 and 6 morenpm8.1.4-r0ALPINE-CVE-2021-43616

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Several nodejs modules in Red Hat Enterprise Linux 8 and software collections for Red Hat Enterprise Linux 7 are not affected by this flaw. This is because the vulnerability was never present in the 6.x version of npm in use by these products.

Red Hat's Secure Software Development Life Cycle utilizes a layered testing approach. This significantly increases attack complexity, because a compromised package must remain undetected for months to years in testing in upstream communities before it could be adopted into a Red Hat product. This long dwell-time reduces impact to Important.

Red Hat's mitigation

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.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8nodejs:16-8060020220519144917.ad008a3aFixed 2022-05-30RHSA-2022:4796
Red Hat Enterprise Linux 8nodejs:12/nodejsNot affected
Red Hat Enterprise Linux 8nodejs:14/nodejsNot affected
Red Hat Enterprise Linux 9nodejsNot affected
Red Hat Quay 3nodejsNot affected
Red Hat Software Collectionsrh-nodejs12-nodejsNot affected
Red Hat Software Collectionsrh-nodejs14-nodejsNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-43616.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-345 (12).

References

Check your stackJSON