{"id":"CVE-2026-48995","title":"pnpm: Tarball hash of GitHub git dependencies is not stored in lockfile","summary":"pnpm: Tarball hash of GitHub git dependencies is not stored in lockfile","severity":"medium","cwe":["CWE-353"],"vendor":"pnpm","product":"pnpm","ecosystem":"npm","affected":["pnpm < 10.33.4","pnpm >= 11.0.0, < 11.0.7"],"patched":["pnpm 10.33.4","pnpm 11.0.7"],"published":"2026-06-26","updated":"2026-06-26","source":"GHSA","sourceUrl":"https://github.com/advisories/GHSA-hg3w-7f8c-63hp","references":[{"url":"https://github.com/pnpm/pnpm/security/advisories/GHSA-hg3w-7f8c-63hp"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48995"},{"url":"https://github.com/advisories/GHSA-hg3w-7f8c-63hp"}],"tags":["ghsa","npm"],"epss":0.00171,"epssPercentile":0.06819,"ingestedAt":"2026-06-29T13:24:35.116Z","slug":"CVE-2026-48995","body":"## Overview\n\n### Summary\n\nA malicious `codeload.github.com` server can serve whatever tarball it wants and pnpm will install it regardless of the lockfile.\n\n### Details\n\nThe lockfile does not store the hash of the dependencies from https://codeload.github.com\n\nThis means that if this server was compromised or a person's machine configuration was compromised, pnpm would download and install these dependencies.\n\n### PoC\n\n```sh\n> pnpm -v     \n10.28.2\n```\n\nGiven the following package.json:\n\n```json\n{\n  \"dependencies\": {\n    \"add\": \"git://github.com/dsherret/npm-git-dep.git#b3eeb9b\"\n  }\n}\n```\n\nThis produces a lockfile like so:\n\n```yaml\nlockfileVersion: '9.0'\n\nsettings:\n  autoInstallPeers: true\n  excludeLinksFromLockfile: false\n\nimporters:\n\n  .:\n    dependencies:\n      add:\n        specifier: git://github.com/dsherret/npm-git-dep.git#b3eeb9b\n        version: https://codeload.github.com/dsherret/npm-git-dep/tar.gz/b3eeb9b\n\npackages:\n\n  add@https://codeload.github.com/dsherret/npm-git-dep/tar.gz/b3eeb9b:\n    resolution: {tarball: https://codeload.github.com/dsherret/npm-git-dep/tar.gz/b3eeb9b}\n    version: 1.0.0\n\nsnapshots:\n\n  add@https://codeload.github.com/dsherret/npm-git-dep/tar.gz/b3eeb9b: {}\n```\n\nNotice that there is no hash. The `b3eeb9b` is not sufficient because I can configure my machine to resolve a compromised tarball from that url (I tested it out and pnpm just installs it).\n\n### Impact\n\nAnyone relying on github git dependencies.\n\n## Affected packages\n\n- `pnpm < 10.33.4`\n- `pnpm >= 11.0.0, < 11.0.7`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `pnpm 10.33.4`\n- `pnpm 11.0.7`","depth":"sunlit","depthScore":28,"depthScoreParts":{"impact":27.5,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}