{"id":"CVE-2026-50151","aliases":["GHSA-jxpm-75mh-9fp7","GO-2026-5882"],"url":"https://o3.security/vulnerability/CVE-2026-50151","summary":"oras-go: credential forwarding via unvalidated Location header in blob upload","details":"## Summary\n\noras-go follows a registry-controlled `Location` header during the monolithic blob upload flow and reuses the `Authorization` header from the initial `POST` request for the subsequent `PUT` request. If a malicious registry returns a cross-host `Location`, oras-go can send the caller's credentials to an attacker-controlled endpoint.\n\n## Affected Versions\n\ntested: v2.6.0 (commit 03243809936cce826494b5506f724c6dc11115b1, as-of 2026-01-24)\nrange: unknown; likely affects earlier v2.x releases that include the same upload flow\n\n## Impact\n\nCredential leak to an attacker-controlled endpoint and client-side ssrf to a cross-host target.\n\n## Affected Component\n\n- `registry/remote/repository.go:878-916` (`blobStore.completePushAfterInitialPost`)\n\n## Reproduction\n\nAttachments include `poc.zip` with a local-only harness (no real registry required). It runs a fake registry server that returns a cross-host `Location` and a second server that records whether it received `Authorization`.\n\n```bash\nunzip -q -o poc.zip -d /tmp/poc\ncd /tmp/poc/poc-F-ORAS-LOCATION-UPLOAD-001\nmake canonical\nmake control\n```\n\n## Recommended Fix\n\n- validate `Location` before uploading (scheme + hostname + effective port) against the original request, or require an explicit opt-in allowlist for cross-host upload urls\n- never forward `Authorization` when the upload target changes host or scheme\n\n## references\n\n- security policy: https://github.com/oras-project/oras-go/security/policy\n- vulnerable code: `registry/remote/repository.go` (see `blobStore.completePushAfterInitialPost`)","published":"2026-07-17T19:41:11.648Z","modified":"2026-10-06T17:26:54.512941900Z","cvss":{"score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"},"epss":{"score":0.00382,"percentile":0.31892,"asOf":"2026-09-16"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"oras.land/oras-go/v2","fixedVersion":"2.6.1"}],"fix":{"url":"https://github.com/oras-project/oras-go/commit/4683c46ef078091544f5f55fd25102f002806991","label":"oras-project/oras-go@4683c46"},"references":[{"type":"WEB","url":"https://github.com/oras-project/oras-go/releases/tag/v2.6.1"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/50xxx/CVE-2026-50151.json"},{"type":"ADVISORY","url":"https://github.com/oras-project/oras-go/security/advisories/GHSA-jxpm-75mh-9fp7"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-50151"},{"type":"FIX","url":"https://github.com/oras-project/oras-go/commit/4683c46ef078091544f5f55fd25102f002806991"},{"type":"FIX","url":"https://github.com/oras-project/oras-go/pull/1152"},{"type":"PACKAGE","url":"https://github.com/oras-project/oras-go"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-06T17:26:54.512941900Z"}}