{"schema_version":"1.7.5","id":"GHSA-jxpm-75mh-9fp7","published":"2026-07-01T21:35:45Z","modified":"2026-07-24T19:11:49.019377087Z","aliases":["CVE-2026-50151","GO-2026-5882"],"related":["CGA-4fj2-773f-f3mg"],"summary":"oras-go blob upload vulnerable to credential forwarding via unvalidated Location header","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`)","affected":[{"package":{"name":"oras.land/oras-go/v2","ecosystem":"Go","purl":"pkg:golang/oras.land/oras-go/v2"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.6.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-jxpm-75mh-9fp7/GHSA-jxpm-75mh-9fp7.json"}}],"references":[{"type":"WEB","url":"https://github.com/oras-project/oras-go/security/advisories/GHSA-jxpm-75mh-9fp7"},{"type":"WEB","url":"https://github.com/oras-project/oras-go/pull/1152"},{"type":"WEB","url":"https://github.com/oras-project/oras-go/commit/4683c46ef078091544f5f55fd25102f002806991"},{"type":"PACKAGE","url":"https://github.com/oras-project/oras-go"},{"type":"WEB","url":"https://github.com/oras-project/oras-go/releases/tag/v2.6.1"}],"database_specific":{"cwe_ids":["CWE-918"],"github_reviewed":true,"github_reviewed_at":"2026-07-01T21:35:45Z","nvd_published_at":null,"severity":"HIGH"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"}]}