CVE-2026-50021: Pnpm Pnpm Has An Integrity Check Vulnerability
MODERATECVE-2026-50021 is a MODERATE (CVSS 6.8) pnpm has an integrity check vulnerability (CWE-354: Improper Validation of Integrity Check Value) affecting Pnpm libraries in the npm ecosystem. The issue involves pnpm has an integrity check bypass via missing lockfile integrity field. Remediation is available by upgrading affected packages to version 11.4.0, 10.34.1.
CVE-2026-50021 at a Glance
Security Impact
CVSS: 6.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-50021
To remediate this vulnerability, upgrade all affected Pnpm dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install pnpm@11.4.0
npm install pnpm@10.34.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls pnpm
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-50021, inspect your project dependencies using npm:
npm ls pnpm
Analyze the terminal output to locate any version of Pnpm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 11.4.0), your application is affected.
Note: The npm ls pnpm command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-354: Improper Validation of Integrity Check Value, where the product does not validate or incorrectly validates the integrity check values or "checksums" of a message. this may prevent it from detecting if the data has been modified or corrupted in transmission. In Pnpm, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-50021 Affected Pnpm Versions
2 component(s)References
Frequently Asked Questions
What is CVE-2026-50021?
Which Pnpm versions are affected?
What version fixes CVE-2026-50021?
Is pnpm affected?
What is the CVSS score of CVE-2026-50021?
What CWE is associated with CVE-2026-50021?
How can I check npm dependencies for CVE-2026-50021?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q6j5-fjx5-2mc3",
"modified" : "2026-06-26T22:53:01Z",
"published" : "2026-06-26T22:53:01Z",
"aliases" : [ "CVE-2026-50021" ],
"summary" : "pnpm Has an Integrity Check Bypass via Missing Lockfile Integrity Field",
"details" : "## Summary\n\npnpm'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.\n\n## Vulnerability Details\n\nThe `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.\n\n```typescript\n// worker/src/start.ts:189-204\nfunction addTarballToStore ({ buffer, storeDir, integrity, ... }: TarballExtractMessage) {\n if (integrity) { // false when integrity is undefined\n const { algorithm, hexDigest } = parseIntegrity(integrity)\n const calculatedHash = crypto.hash(algorithm, buffer, 'hex')\n if (calculatedHash !== hexDigest) {\n return { status: 'error', error: { type: 'integrity_validation_failed', ... } }\n }\n }\n return {\n status: 'success',\n value: { integrity: integrity ?? calcIntegrity(buffer) },\n }\n}\n```\n\n## Proof of Concept\n\n```bash\nbash autofyn_audit/exploits/vuln1_integrity_bypass/exploit.sh\n# Publishes a package, generates lockfile, republishes tampered version,\n# strips integrity field, re-runs install --frozen-lockfile.\n# Result: PASS -- tampered package installed without integrity error.\n```\n\n## Impact\n\nSupply 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.\n\n## Suggested Remediation\n\nRequire 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.\n\n---\n\n> Discovered by [AutoFyn](https://github.com/SignalPilot-Labs/AutoFyn)\n> Full audit report: [audit_report.md](https://github.com/tempcollab/pnpm/blob/main/autofyn_audit/audit_report.md)\n> Exploit script: [exploit.sh](https://github.com/tempcollab/pnpm/blob/main/autofyn_audit/exploits/vuln1_integrity_bypass/exploit.sh)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "pnpm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "11.0.0"
}, {
"fixed" : "11.4.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "pnpm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "10.34.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pnpm/pnpm/security/advisories/GHSA-q6j5-fjx5-2mc3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-50021"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pnpm/pnpm"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-354" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-26T22:53:01Z",
"nvd_published_at" : "2026-06-25T18:16:39Z"
}
}