Skip to content
OpenAdvisories
Critical · 9.0 Public exploit CVE-2021-43616 EUVD-2021-30530GHSA-ppxp-px5q-gwqm

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 Nov 13, 2021 · Updated Aug 4, 2024 · Assigned by mitre

Description

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 npm 8.4.1~ds-1 —
Debian 13 npm 8.4.1~ds-1 —
Debian 12 npm 8.4.1~ds-1 —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 npm No fix yet —
Ubuntu 26.04 LTS npm No fix yet —
Ubuntu 25.10 npm No fix yet —
Ubuntu 24.04 LTS npm No fix yet —
Ubuntu 22.04 LTS npm No fix yet —
ReleasePackageFixed inAdvisory
RHEL 8 nodejs +3 1:16.14.0-4.module+el8.6.0+15294+54b291d2 RHSA-2022:4796
RHEL 8 nodejs-nodemon 2.0.15-1.module+el8.6.0+15294+54b291d2 RHSA-2022:4796
RHEL 8 nodejs-packaging 25-1.module+el8.5.0+10992+fac5fe06 RHSA-2022:4796
RHEL 8 npm 1:8.3.1-1.16.14.0.4.module+el8.6.0+15294+54b291d2 RHSA-2022:4796

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 8 nodejs +3 1:16.14.0-4.module_el8.6.0+2904+f21ad6f4 ALSA-2022:4796
AlmaLinux 8 nodejs-nodemon 2.0.15-1.module_el8.5.0+2605+45d748af ALSA-2022:4796
AlmaLinux 8 nodejs-packaging 25-1.module_el8.5.0+246+05401605 ALSA-2022:4796
AlmaLinux 8 npm 1:8.3.1-1.16.14.0.4.module_el8.6.0+2904+f21ad6f4 ALSA-2022:4796

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 nodejs 1:16.14.0-4.module+el8.6.0+978+59f26232 RLSA-2022:4796
Rocky Linux 8 nodejs-nodemon 2.0.15-1.module+el8.5.0+721+4c107270 RLSA-2022:4796
Rocky Linux 8 nodejs-packaging 25-1.module+el8.5.0+702+221f14e6 RLSA-2022:4796
ReleasePackageFixed inAdvisory
Alpine v3.24 npm 8.1.4-r0 —
Alpine v3.23 npm 8.1.4-r0 —
Alpine v3.22 npm 8.1.4-r0 —
Alpine v3.21 npm 8.1.4-r0 —
Alpine v3.20 npm 8.1.4-r0 —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 npm 8.1.4-r0 —
Alpine v3.18 npm 8.1.4-r0 —
Alpine v3.17 npm 8.1.4-r0 —
Alpine v3.16 npm 8.1.4-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 nodejs +4 1:18.12.1-1.amzn2023.0.2 ALAS2023-2023-084
Amazon Linux 2023 npm 1:8.19.2-1.18.12.1.1.amzn2023.0.2 ALAS2023-2023-084
Amazon Linux 2023 v8-devel 2:10.2.154.15-1.18.12.1.1.amzn2023.0.2 ALAS2023-2023-084

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 8 nodejs +3 1:16.14.0-4.module+el8.6.0+20672+19f3909b ELSA-2022-4796
Oracle Linux 8 nodejs-nodemon 2.0.15-1.module+el8.6.0+20672+19f3909b ELSA-2022-4796
Oracle Linux 8 nodejs-packaging 25-1.module+el8.5.0+20388+4b61e68d ELSA-2022-4796
Oracle Linux 8 npm 1:8.3.1-1.16.14.0.4.module+el8.6.0+20672+19f3909b ELSA-2022-4796

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

  • icatalina/CVE-2021-43616 ★ 3 · Nov 15, 2021

    Repo demonstrating CVE-2021-43616 / https://github.com/npm/cli/issues/2701

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 6

References