GHSA-jxpm-75mh-9fp7

Suggest an improvement
Source
https://github.com/advisories/GHSA-jxpm-75mh-9fp7
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-jxpm-75mh-9fp7/GHSA-jxpm-75mh-9fp7.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-jxpm-75mh-9fp7
Aliases
Downstream
CGA (552)
MINI (203)
Published
2026-07-01T21:35:45Z
Modified
2026-09-10T03:50:52Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
oras-go blob upload vulnerable to credential forwarding via unvalidated Location header
Details

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 Location before uploading (scheme + hostname + effective port) against the original request, or require an explicit opt-in allowlist for cross-host upload urls
  • never forward Authorization when the upload target changes host or scheme

references

Database specific
{
    "cwe_ids":  [
        "CWE-918"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-07-01T21:35:45Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

Go / oras.land/oras-go/v2

Package

Name
oras.land/oras-go/v2
View open source insights on deps.dev
Purl
pkg:golang/oras.land/oras-go/v2

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
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"