GHSA-hg3w-7f8c-63hp

Suggest an improvement
Source
https://github.com/advisories/GHSA-hg3w-7f8c-63hp
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-hg3w-7f8c-63hp/GHSA-hg3w-7f8c-63hp.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-hg3w-7f8c-63hp
Aliases
Downstream
CGA (2)
MINI (1)
Published
2026-06-26T21:49:22Z
Modified
2026-06-26T22:11:31Z
Severity
  • 4.8 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
pnpm: Tarball hash of GitHub git dependencies is not stored in lockfile
Details

Summary

A malicious codeload.github.com server can serve whatever tarball it wants and pnpm will install it regardless of the lockfile.

Details

The lockfile does not store the hash of the dependencies from https://codeload.github.com

This means that if this server was compromised or a person's machine configuration was compromised, pnpm would download and install these dependencies.

PoC

> pnpm -v     
10.28.2

Given the following package.json:

{
  "dependencies": {
    "add": "git://github.com/dsherret/npm-git-dep.git#b3eeb9b"
  }
}

This produces a lockfile like so:

lockfileVersion: '9.0'

settings:
  autoInstallPeers: true
  excludeLinksFromLockfile: false

importers:

  .:
    dependencies:
      add:
        specifier: git://github.com/dsherret/npm-git-dep.git#b3eeb9b
        version: https://codeload.github.com/dsherret/npm-git-dep/tar.gz/b3eeb9b

packages:

  add@https://codeload.github.com/dsherret/npm-git-dep/tar.gz/b3eeb9b:
    resolution: {tarball: https://codeload.github.com/dsherret/npm-git-dep/tar.gz/b3eeb9b}
    version: 1.0.0

snapshots:

  add@https://codeload.github.com/dsherret/npm-git-dep/tar.gz/b3eeb9b: {}

Notice 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).

Impact

Anyone relying on github git dependencies.

Database specific
{
    "cwe_ids":  [
        "CWE-353"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-06-26T21:49:22Z",
    "nvd_published_at":  "2026-06-25T18:16:38Z",
    "severity":  "MODERATE"
}
References

Affected packages

npm / pnpm

Package

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
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"

npm / pnpm

Package

Affected 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"