oras-go blob upload vulnerable to credential forwarding via unvalidated Location header
Published 1 Jul 2026 · Updated 10 Sept 2026
Is your project on an affected oras.land/oras-go/v2?
Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <2.6.1
- Fixed in
- 2.6.1
go get oras.land/oras-go/v2@v2.6.1Details
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)
Is GHSA-jxpm-75mh-9fp7 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected oras.land/oras-go/v2, and gives you the command that fixes it.
More advisories for oras.land/oras-go/v2
- LowCVE-2026-85731Arbitrary file write outside file.Store root via symlink-chain bypass in tar extraction (pushDir) in oras.land/oras-go · 1 Oct 2026
- LowCVE-2026-85732Blind SSRF via unvalidated Link header URL in pagination allows internal network probing in oras.land/oras-go · 1 Oct 2026
- MediumCVE-2026-85732oras-go: Blind SSRF via unvalidated Link header URL in pagination allows internal network probing · 17 Sept 2026
- HighCVE-2026-85731oras-go: Arbitrary file write outside file.Store root via symlink-chain bypass in tar extraction (pushDir) · 17 Sept 2026
- LowCVE-2026-50162Oras-go: File store write outside workingDir via symlink traversal in oras.land/oras-go · 24 Jul 2026
- LowCVE-2026-50163Hardlink path traversal during tar extraction in oras.land/oras-go · 24 Jul 2026
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.