{"id":"GHSA-jxpm-75mh-9fp7","revision":"d34cc9f4c26f4d369e3d387a889911a1","records":[{"revision":"d34cc9f4c26f4d369e3d387a889911a1","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-jxpm-75mh-9fp7","aliases":["CVE-2026-50151","GO-2026-5882"],"title":"oras-go blob upload vulnerable to credential forwarding via unvalidated Location header","description":"## 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`)","state":0,"publishedAt":"2026-07-01T21:35:45+00:00","modifiedAt":"2026-09-10T03:50:52.5138554+00:00","affected":[{"ecosystem":"Go","name":"oras.land/oras-go/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.6.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/oras-project/oras-go/security/advisories/GHSA-jxpm-75mh-9fp7","https://github.com/oras-project/oras-go/pull/1152","https://github.com/oras-project/oras-go/commit/4683c46ef078091544f5f55fd25102f002806991","https://github.com/oras-project/oras-go","https://github.com/oras-project/oras-go/releases/tag/v2.6.1"],"sourceUrl":"https://github.com/advisories/GHSA-jxpm-75mh-9fp7","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-jxpm-75mh-9fp7","identifiers":["GHSA-jxpm-75mh-9fp7","CVE-2026-50151","GO-2026-5882"]},"retained":false,"historicalAffected":[]}],"coverage":[]}