oras.land/oras-go/v2

CVE-2026-48978

CVE-2026-48978 is a low-severity server-side request forgery (SSRF) vulnerability in oras.land/oras-go/v2 (go), affecting versions < 2.6.1. It is fixed in 2.6.1.

Key facts
CVSS score
N/A
Low
Attack vector
Not available
Issuing authority
GitHub Advisory Database
Affected package
oras.land/oras-go/v2
Fixed in
2.6.1
Disclosed
2026

Summary

Summary oras-go's auth.Client follows the realm URL from a registry's WWW-Authenticate: Bearer challenge without validating its scheme or host. The realm field is server-controlled by design in the OCI/distribution spec, registries legitimately point token requests at a separate auth endpoint (e.g. Docker Hub's registry-1.docker.io -> auth.docker.io), so cross-host realms on public DNS names are not in themselves a vulnerability. Two specific patterns, however, are never legitimate under any registry trust model and can be abused by a malicious or compromised registry (or a man-in-the-middle on a plaintext connection): SSRF to internal networks. A realm of http://169.254.169.254/... (AWS/Azure IMDS), http://10.0.0.x/... (RFC 1918), or http://127.0.0.1/... causes oras-go running on a cloud VM or corporate workstation to issue outbound HTTP requests from inside the user's trust boundary to an endpoint the user did not choose. The user's stored credentials are attached to those requests, but the principal harm is the network primitive, probing internal endpoints from the client. On IMDSv1 the response body is recoverable from log channels; on IMDSv2 the probe itself can still be used for service discovery. TLS downgrade. A registry contacted over https:// can return a realm with an http:// scheme, causing oras-go to send the user's credentials over plaintext to the token endpoint. This defeats the transport security the user chose when typing https://. What is NOT claimed This advisory does not claim that credential forwarding to an arbitrary public attacker host through a server-controlled realm is, on its own, a vulnerability. The distribution spec defines realm as a server-controlled field; a strict same-host or same-eTLD+1 enforcement would deviate from the spec and break legitimate split-host deployments. Operators who want defense-in-depth against cross-host realm forwarding can use the opt-in Client.TrustedRealmHosts allowlist (added separately). Affected versions oras.land/oras-go/v2 <= v2.6.0 Severity Medium. Network attack vector, low complexity, no privileges required, user interaction required (victim runs an oras command against the malicious or MITM'd registry), unchanged scope. Confidentiality impact is limited, IMDS probe responses can disclose information, and TLS downgrade exposes the realm request to passive observers, but the attacker does not obtain credentials beyond what the malicious endpoint already controls. Affected code registry/remote/auth/client.go, Client.Do() (bearer challenge handling) registry/remote/auth/client.go, Client.fetchBearerToken() / fetchDistributionToken / fetchOAuth2Token The realm parameter from parseChallenge is threaded through to http.NewRequestWithContext without scheme or host validation. CWE CWE-918: Server-Side Request Forgery (SSRF) CWE-319: Cleartext Transmission of Sensitive Information Patch registry/remote/auth/client.go now rejects realm URLs that: use a scheme other than http or https use http when the registry was contacted over https (TLS downgrade) use an IP literal in a loopback, link-local, private, or unspecified range, unless the registry itself was reached at the same hostname (so loopback / in-cluster deployments are unaffected) Cross-host realms on public DNS names continue to be accepted. Credit Reported by bugbunny.ai.

Impact

What is server-side request forgery (SSRF)?

Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside. Typical impact: access to internal metadata services, internal APIs, or cloud credentials.

Affected versions

go

  • oras.land/oras-go/v2 (< 2.6.1)
  • oras.land/oras-go (<= 1.2.7)

Security releases

  • oras.land/oras-go/v2 → 2.6.1 (go)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's runtime-powered SCA identifies whether CVE-2026-48978 is reachable in your applications. Explore open-source security for your team.

See if CVE-2026-48978 is reachable in your applications. Get a demo

Already deployed Kodem? See CVE-2026-48978 in your environment

Remediation advice

Upgrade oras.land/oras-go/v2 to 2.6.1 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about CVE-2026-48978

What is CVE-2026-48978?

CVE-2026-48978 is a low-severity server-side request forgery (SSRF) vulnerability in oras.land/oras-go/v2 (go), affecting versions < 2.6.1. It is fixed in 2.6.1. Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside.

Which packages are affected by CVE-2026-48978?
  • oras.land/oras-go/v2 (go) (versions < 2.6.1)
  • oras.land/oras-go (go) (versions <= 1.2.7)
Is there a fix for CVE-2026-48978?

Yes. CVE-2026-48978 is fixed in 2.6.1. Upgrade to this version or later.

Is CVE-2026-48978 exploitable, and should I be worried?

Whether CVE-2026-48978 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether CVE-2026-48978 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix CVE-2026-48978?

Upgrade oras.land/oras-go/v2 to 2.6.1 or later.

Stop the waste.
Protect your environment with Kodem.