CVE-2026-50021: pnpm: Integrity Check Bypass via Missing Lockfile Integrity Field

Published Jun 25, 2026
·
Updated

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.

typescript // worker/src/start.ts:189-204 function addTarballToStore ({ buffer, storeDir, integrity, ... }: TarballExtractMessage) { if (integrity) { // false when integrity is undefined const { algorithm, hexDigest } = parseIntegrity(integrity) const calculatedHash = crypto.hash(algorithm, buffer, 'hex') if (calculatedHash !== hexDigest) { return { status: 'error', error: { type: 'integrityvalidationfailed', ... } } } } return { status: 'success', value: { integrity: integrity ?? calcIntegrity(buffer) }, } }

Proof of Concept

bash bash autofynaudit/exploits/vuln1integritybypass/exploit.sh Publishes a package, generates lockfile, republishes tampered version, strips integrity field, re-runs install --frozen-lockfile. Result: PASS -- tampered package installed without integrity error.

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

Other sources

pnpm is a package manager. Prior to 10.34.0 and 11.4.0, 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. This vulnerability is fixed in 10.34.0 and 11.4.0.

NVD

Affected Software

5 affected componentsFixes available
pnpm/pnpm>10.34.0<11.4.0
npm/pnpm<10.34.1
10.34.1
npm/pnpm>=11.0.0<11.4.0
11.4.0
PNPM Pnpm Node.js<10.34.0
PNPM Pnpm Node.js>=11.0.0<11.4.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/pnpm to a version that resolves this vulnerability.

    Fixed in 10.34.1
  2. Upgrade

    Upgrade npm/pnpm to a version that resolves this vulnerability.

    Fixed in 11.4.0
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 10.34.0
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 11.4.0
  5. Configuration

    Change `addTarballToStore` so that when `--frozen-lockfile` is active it rejects remote lockfile entries that lack an `integrity` field, ensuring hash verification cannot be skipped when integrity is missing.

    pnpm tarball extraction worker (worker/src/start.ts) integrity verification guard for remote tarball resolutions = Require an integrity field for remote tarball resolutions; when integrity is absent, fail instead of skipping verification (i.e., do not use a fail-open `if (integrity)` guard)

Event History

Jun 25, 2026
CVE Published
via MITRE·04:48 PM
Data Sourced
via MITRE·04:48 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:16 PM
DescriptionSeverityWeaknessAffected Software
Jun 26, 2026
Advisory Published
via GitHub·10:53 PM
Data Sourced
via GitHub·10:53 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-50021?

CVE-2026-50021 has a medium severity rating of 6.8.

2

How do I fix CVE-2026-50021?

To fix CVE-2026-50021, ensure that the `integrity` field is present in your pnpm-lock.yaml file.

3

What type of attack does CVE-2026-50021 enable?

CVE-2026-50021 enables attackers to bypass the integrity check and potentially install compromised packages.

4

Which software is affected by CVE-2026-50021?

CVE-2026-50021 affects pnpm, a package manager for Node.js.

5

When was CVE-2026-50021 published?

CVE-2026-50021 was published on June 25, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203