7.5high
oras-go: credential forwarding via unvalidated Location header in blob upload
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.38% (higher than 34% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-jxpm-75mh-9fp7GO-2026-5882
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| oras-project oras-go | < 2.6.1 | CVE List |
| oras.land/oras-go/v2 (Go) | before 2.6.1 | GitHub Advisory Database, Go Vulnerability Database |
| linuxfoundation oras | before 2.6.1 | NVD |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Summary
oras-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.
Affected Versions
tested: v2.6.0 (commit 03243809936cce826494b5506f724c6dc11115b1, as-of 2026-01-24) range: unknown; likely affects earlier v2.x releases that include the same upload flow
Impact
Credential leak to an attacker-controlled endpoint and client-side ssrf to a cross-host target.
Affected Component
registry/remote/repository.go:878-916(blobStore.completePushAfterInitialPost)
Reproduction
Attachments 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.
unzip -q -o poc.zip -d /tmp/poc
cd /tmp/poc/poc-F-ORAS-LOCATION-UPLOAD-001
make canonical
make control
Recommended Fix
- validate
Locationbefore uploading (scheme + hostname + effective port) against the original request, or require an explicit opt-in allowlist for cross-host upload urls - never forward
Authorizationwhen the upload target changes host or scheme
references
- security policy: https://github.com/oras-project/oras-go/security/policy
- vulnerable code:
registry/remote/repository.go(seeblobStore.completePushAfterInitialPost)
Go Vulnerability Database
Oras-go: Blob upload vulnerable to credential forwarding via unvalidated Location header in oras.land/oras-go
NVD (es)
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.
References
| https://github.com/oras-project/oras-go/security/advisories/GHSA-jxpm-75mh-9fp7 | advisory, exploit, mitigation, vendor-advisory, web | |
| https://github.com/oras-project/oras-go/pull/1152 | fix, issue-tracking, patch, web | |
| https://github.com/oras-project/oras-go/commit/4683c46ef078091544f5f55fd25102f002806991 | fix, patch, web | |
| https://github.com/oras-project/oras-go/releases/tag/v2.6.1 | release-notes, web | |
| https://github.com/oras-project/oras-go | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-50151 changed 2026-07-20 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-jxpm-75mh-9fp7 changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-5882 changed 2026-07-24 | CC-BY-4.0 |
| NVD | CVE-2026-50151 changed 2026-10-24 | Public domain |