PT-2021-23891 · Npm+5 · Npm+5

Icatalinao

·

Published

2021-11-13

·

Updated

2026-02-27

·

CVE-2021-43616

CVSS v3.1

9.8

Critical

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions: npm versions 7.x through 8.1.3
Description: The npm ci command proceeds with an installation even if dependency information in package-lock.json differs from package.json, which is inconsistent with the documentation. This behavior 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. The npm team believes this is not a vulnerability, as it would require someone to socially engineer package.json which has different dependencies than package-lock.json, and that user would have to have file system or write access to change dependencies.
Recommendations: For npm versions 7.x through 8.1.3, consider restricting access to the npm ci command until a patch is available, and ensure that package.json and package-lock.json are handled with caution to prevent potential social engineering attacks. As a temporary workaround, manually verify the dependencies in package-lock.json and package.json before proceeding with the installation. At the moment, there is no information about a newer version that contains a fix for this issue.

Exploit

Fix

Insufficient Verification of Data Authenticity

Weakness Enumeration

Related Identifiers

ALSA-2022:4796
ALSA-2022_4796
CESA-2022_4796
CLEANSTART-2026-NY12442
CVE-2021-43616
ELSA-2022-4796
MGASA-2022-0294
RHSA-2022:4796
RHSA-2022_4796
RLSA-2022:4796
RLSA-2022_4796

Affected Products

Almalinux
Centos
Debian
Red Hat
Rocky Linux
Npm