{"id":"GHSA-hg3w-7f8c-63hp","summary":"pnpm: Tarball hash of GitHub git dependencies is not stored in lockfile","details":"### 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\u003e 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.","aliases":["CVE-2026-48995"],"modified":"2026-06-26T22:11:31.075929Z","published":"2026-06-26T21:49:22Z","database_specific":{"nvd_published_at":"2026-06-25T18:16:38Z","cwe_ids":["CWE-353"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2026-06-26T21:49:22Z"},"references":[{"type":"WEB","url":"https://github.com/pnpm/pnpm/security/advisories/GHSA-hg3w-7f8c-63hp"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48995"},{"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.33.4"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-hg3w-7f8c-63hp/GHSA-hg3w-7f8c-63hp.json"}},{"package":{"name":"pnpm","ecosystem":"npm","purl":"pkg:npm/pnpm"},"ranges":[{"type":"SEMVER","events":[{"introduced":"11.0.0"},{"fixed":"11.0.7"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-hg3w-7f8c-63hp/GHSA-hg3w-7f8c-63hp.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U"}]}