pnpm

CVE-2026-50021

CVE-2026-50021 is a medium-severity security vulnerability in pnpm (npm), affecting versions >= 11.0.0, < 11.4.0. It is fixed in 11.4.0, 10.34.1.

Key facts
CVSS score
6.8
Medium
Attack vector
Network
Issuing authority
GitHub Advisory Database
Affected package
pnpm
Fixed in
11.4.0, 10.34.1
Disclosed
2026

Summary

Summary pnpm's tarball extraction worker skips integrity verification when the integrity field is absent from the lockfile resolution. If an attacker can both modify pnpm-lock.yaml to remove the integrity: field and cause the referenced registry URL to serve altered package content, pnpm install --frozen-lockfile can install the altered package without an integrity error. npm's npm ci enforces integrity by default; pnpm's behavior of silently skipping verification is a pnpm-specific fail-open gap. Vulnerability Details The addTarballToStore function in worker/src/start.ts (lines 189-204) checks if (integrity) before verifying the tarball hash. The TarballResolution type declares integrity as optional (integrity?: string). When the lockfile omits the integrity field, the guard evaluates to false, skipping hash verification entirely. The worker then computes a new hash from the unverified content and stores it as legitimate. Proof of Concept Impact Supply chain compromise in environments where an attacker can both alter the lockfile and cause the referenced registry URL to serve altered package content. The --frozen-lockfile flag does not fail closed when the integrity field is missing. Suggested Remediation Require an integrity field for remote tarball resolutions. Change the if (integrity) guard to fail when integrity is absent for non-local packages. When --frozen-lockfile is active, reject lockfile entries that lack integrity for remote packages. Discovered by AutoFyn Full audit report: auditreport.md Exploit script: exploit.sh

Impact

Severity and exposure

CVE-2026-50021 has a CVSS score of 6.8 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.

A fixed version is available (11.4.0, 10.34.1). Upgrading removes the vulnerable code path.

Affected versions

npm

  • pnpm (>= 11.0.0, < 11.4.0)
  • pnpm (< 10.34.1)

Security releases

  • pnpm → 11.4.0 (npm)
  • pnpm → 10.34.1 (npm)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's runtime-powered SCA identifies whether CVE-2026-50021 is reachable in your applications. Explore open-source security for your team.

See if CVE-2026-50021 is reachable in your applications. Get a demo

Already deployed Kodem? See CVE-2026-50021 in your environment

Remediation advice

Upgrade the following packages to resolve this vulnerability:

  • Upgrade pnpm to 11.4.0 or later
  • Upgrade pnpm to 10.34.1 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about CVE-2026-50021

What is CVE-2026-50021?

CVE-2026-50021 is a medium-severity security vulnerability in pnpm (npm), affecting versions >= 11.0.0, < 11.4.0. It is fixed in 11.4.0, 10.34.1.

How severe is CVE-2026-50021?

CVE-2026-50021 has a CVSS score of 6.8 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.

Which versions of pnpm are affected by CVE-2026-50021?

pnpm (npm) versions >= 11.0.0, < 11.4.0 is affected.

Is there a fix for CVE-2026-50021?

Yes. CVE-2026-50021 is fixed in 11.4.0, 10.34.1. Upgrade to this version or later.

Is CVE-2026-50021 exploitable, and should I be worried?

Whether CVE-2026-50021 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether CVE-2026-50021 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix CVE-2026-50021?
  • Upgrade pnpm to 11.4.0 or later
  • Upgrade pnpm to 10.34.1 or later

Stop the waste.
Protect your environment with Kodem.