{"id":"GHSA-7vhp-vf5g-r2fw","summary":"pnpm Has Lockfile Integrity Bypass that Allows Remote Dynamic Dependencies","details":"### Summary\n\nHTTP tarball dependencies (and git-hosted tarballs) are stored in the lockfile without integrity hashes. This allows the remote server to serve different content on each install, even when a lockfile is committed.\n\n### Details\n\nWhen a package depends on an HTTP tarball URL, pnpm's tarball resolver returns only the URL without computing an integrity hash:\n\n`resolving/tarball-resolver/src/index.ts`:\n```javascript\nreturn {\n  resolution: {\n    tarball: resolvedUrl,\n    // No integrity field\n  },\n  resolvedVia: 'url',\n}\n```\n\nThe resulting lockfile entry has no integrity to verify:\n```yaml\nremote-dynamic-dependency@http://example.com/pkg.tgz:\n  resolution: {tarball: http://example.com/pkg.tgz}\n  version: 1.0.0\n```\n\nSince there is no integrity hash, pnpm cannot detect when the server returns different content. \n\nThis affects:\n- HTTP/HTTPS tarball URLs (`\"pkg\": \"https://example.com/pkg.tgz\"`)\n- Git shorthand dependencies (`\"pkg\": \"github:user/repo\"`)\n- Git URLs (`\"pkg\": \"git+https://github.com/user/repo\"`)\n\nnpm registry packages are not affected as they include integrity hashes from the registry metadata.\n\n### PoC\n\nSee attached [pnpm-bypass-integrity-poc.zip](https://github.com/user-attachments/files/23819648/pnpm-bypass-integrity-poc.zip)\n\nThe POC includes:\n- A server that returns different tarball content on each request\n- A `malicious-package` that depends on the HTTP tarball\n- A `victim` project that depends on `malicious-package`\n\nTo run:\n```bash\ncd pnpm-bypass-integrity-poc\n./run-poc.sh\n```\n\nThe output shows that each install (with `pnpm store prune` between them) downloads different code despite having a committed lockfile.\n\n### Impact\n\nAn attacker who publishes a package with an HTTP tarball dependency can serve different code to different users or CI/CD environments. This enables:\n\n- Targeted attacks based on request metadata (IP, headers, timing)\n- Evasion of security audits (serve benign code during review, malicious code later)\n- Supply chain attacks where the malicious payload changes over time\n\nThe attack requires the victim to install a package that has an HTTP/git tarball in its dependency tree. The victim's lockfile provides no protection.","aliases":["CVE-2025-69263"],"modified":"2026-02-03T03:16:20.731152Z","published":"2026-01-07T19:06:59Z","database_specific":{"github_reviewed_at":"2026-01-07T19:06:59Z","nvd_published_at":"2026-01-07T22:15:43Z","cwe_ids":["CWE-494"],"severity":"HIGH","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/pnpm/pnpm/security/advisories/GHSA-7vhp-vf5g-r2fw"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-69263"},{"type":"WEB","url":"https://github.com/pnpm/pnpm/commit/0958027f88a99ccefe7e9676cdebba393dfbdc85"},{"type":"PACKAGE","url":"https://github.com/pnpm/pnpm"}],"affected":[{"package":{"name":"pnpm","ecosystem":"npm","purl":"pkg:npm/pnpm"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"10.26.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/01/GHSA-7vhp-vf5g-r2fw/GHSA-7vhp-vf5g-r2fw.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}