Skip to content
Heist/ feed
Back to feed
Critical

npm — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2021-43616

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.

Products
npm
Affected versions
11.16.0+ds2-4, 7.24.2+ds-1, 7.24.2+ds-2, 7.5.2+ds-2, 8.3.0~ds-1, 8.3.0~ds-2, 8.3.2~ds-1, 8.5.0~ds-1, 8.5.1~ds-1, 9.2.0~ds1-1, 9.2.0~ds1-2, 9.2.0~ds1-3, 9.2.0~ds2-2, 9.2.0~ds3-1
Fixed versions
Not specified
CVEs
CVE-2021-43616
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 00:44 UTC · Revision 1

Source evidence

UBUNTU-CVE-2021-43616

core-osv · Original source

Published 13 Nov 2021, 18:15 UTC

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.

osv:UBUNTU-CVE-2021-43616

npm

Fixed versions: Not specified

npm

Fixed versions: Not specified

npm

Fixed versions: Not specified

npm

Fixed versions: Not specified

npm

Fixed versions: Not specified

Complete source record
{
  "id": "6d99f52585e695776195469a6697cee33b94356028e883bdad73afd751675644",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2021-43616",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2021-43616",
    "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.",
    "evidence": "osv:UBUNTU-CVE-2021-43616",
    "products": [
      {
        "name": {
          "value": "npm",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "7.5.2+ds-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "7.24.2+ds-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "7.24.2+ds-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "8.3.0~ds-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "8.3.0~ds-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "8.3.2~ds-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "8.5.0~ds-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "8.5.1~ds-1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "npm",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "9.2.0~ds1-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "9.2.0~ds1-2",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "npm",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "9.2.0~ds1-3",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "npm",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "9.2.0~ds3-1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "11.16.0+ds2-4",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "npm",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "9.2.0~ds1-3",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "9.2.0~ds2-2",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "9.2.0~ds3-1",
            "evidence": "/affected/4/versions"
          }
        ]
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "UBUNTU-CVE-2021-43616",
      "aliases": [
        "UBUNTU-CVE-2021-43616"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H"
        },
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "npm",
            "purl": "pkg:deb/ubuntu/npm?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "7.5.2+ds-2",
            "7.24.2+ds-1",
            "7.24.2+ds-2",
            "8.3.0~ds-1",
            "8.3.0~ds-2",
            "8.3.2~ds-1",
            "8.5.0~ds-1",
            "8.5.1~ds-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-43616.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "npm",
                "binary_version": "8.5.1~ds-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "npm",
            "purl": "pkg:deb/ubuntu/npm?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "9.2.0~ds1-1",
            "9.2.0~ds1-2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-43616.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "npm",
                "binary_version": "9.2.0~ds1-2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "npm",
            "purl": "pkg:deb/ubuntu/npm?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "9.2.0~ds1-3"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-43616.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "npm",
                "binary_version": "9.2.0~ds1-3"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "npm",
            "purl": "pkg:deb/ubuntu/npm?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "9.2.0~ds3-1",
            "11.16.0+ds2-4"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-43616.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "npm",
                "binary_version": "11.16.0+ds2-4"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "npm",
            "purl": "pkg:deb/ubuntu/npm?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "9.2.0~ds1-3",
            "9.2.0~ds2-2",
            "9.2.0~ds3-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-43616.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "npm",
                "binary_version": "9.2.0~ds3-1"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:56:01.364503066Z",
      "provider": "osv",
      "upstream": [
        "CVE-2021-43616"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2021-43616",
        "https://github.com/npm/cli/issues/2701",
        "https://docs.npmjs.com/cli/v7/commands/npm-ci",
        "https://github.com/icatalina/CVE-2021-43616",
        "https://www.cve.org/CVERecord?id=CVE-2021-43616"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2021-43616",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/1/score"
  },
  "source_id": "core-osv",
  "document_id": 354586,
  "published_at": "2021-11-13T18:15:00+00:00"
}