{"id":"CVE-2026-50151","aliases":["CVE-2026-50151","GHSA-jxpm-75mh-9fp7","GO-2026-5882"],"related":[],"kind":"vulnerability","state":"published","title":"oras-go: credential forwarding via unvalidated Location header in blob upload","summary":"oras-go is a Go library for managing OCI artifacts. Prior to 2.6.1, registry/remote/repository.go in blobStore.completePushAfterInitialPost follows a registry-controlled Location header during monolithic blob upload and reuses the Authorization header from the initial POST request for the subsequent PUT request, allowing a malicious registry to return a cross-host Location and receive the caller's credentials at an attacker-controlled endpoint. This issue is fixed in version 2.6.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"oras-go is a Go library for managing OCI artifacts. Prior to 2.6.1, registry/remote/repository.go in blobStore.completePushAfterInitialPost follows a registry-controlled Location header during monolithic blob upload and reuses the Authorization header from the initial POST request for the subsequent PUT request, allowing a malicious registry to return a cross-host Location and receive the caller's credentials at an attacker-controlled endpoint. This issue is fixed in version 2.6.1.","source":"cvelist"},{"lang":"en","text":"## 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`)","format":"markdown","source":"ghsa"},{"lang":"en","text":"Oras-go: Blob upload vulnerable to credential forwarding via unvalidated Location header in oras.land/oras-go","format":"markdown","source":"go"},{"lang":"es","text":"oras-go es una biblioteca Go para gestionar artefactos OCI. Antes de la versión 2.6.1, registry/remote/repository.go en blobStore.completePushAfterInitialPost sigue un encabezado Location controlado por el registro durante la carga monolítica de blobs y reutiliza el encabezado Authorization de la solicitud POST inicial para la solicitud PUT subsiguiente, permitiendo que un registro malicioso devuelva una Location entre hosts y reciba las credenciales del llamante en un punto final controlado por el atacante. Este problema está solucionado en la versión 2.6.1.","source":"nvd"}],"published":"2026-07-01T21:35:45.000Z","modified":"2026-10-24T20:10:00.137Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":"< 2.6.1","status":"affected"}],"vendor":"oras-project","product":"oras-go","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.6.1"}],"ecosystem":"Go","package":"oras.land/oras-go/v2","purl":"pkg:golang/oras.land/oras-go/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.6.1"}],"ecosystem":"Go","package":"oras.land/oras-go/v2","purl":"pkg:golang/oras.land/oras-go/v2","source":"go"},{"ranges":[{"status":"affected","fixed":"2.6.1"}],"vendor":"linuxfoundation","product":"oras","cpe":"cpe:2.3:a:linuxfoundation:oras:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/oras-project/oras-go/security/advisories/GHSA-jxpm-75mh-9fp7","tags":["advisory","exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/oras-project/oras-go/pull/1152","tags":["fix","issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/oras-project/oras-go/commit/4683c46ef078091544f5f55fd25102f002806991","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/oras-project/oras-go/releases/tag/v2.6.1","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/oras-project/oras-go","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-07-20T13:52:00.588Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-50151","url":"https://www.cve.org/CVERecord?id=CVE-2026-50151","licence":"CVE Terms of Use","modified":"2026-07-20T13:52:07.476Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jxpm-75mh-9fp7","url":"https://github.com/advisories/GHSA-jxpm-75mh-9fp7","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:52.513Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5882","url":"https://pkg.go.dev/vuln/GO-2026-5882","licence":"CC-BY-4.0","modified":"2026-07-24T19:00:26.723Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-50151","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-50151","licence":"Public domain","modified":"2026-10-24T20:10:00.137Z"}],"updatedAt":"2026-11-25T22:59:28.538Z","epss":{"score":0.00382,"percentile":0.34357,"date":"2026-12-01T12:00:22.000Z"}}