go package report

Is oras.land/oras-go safe?

1 known vulnerability, worst severity LOW.

// reach

0 direct dependencies

none carry a known advisory

    0 packages depend on it

    an advisory here reaches each of them

      Create a free accountfor every dependency path, dependent and what to upgrade
      // ai model usage

      Tracked for PyPI packages. HuggingFace models declare Python dependencies, so go packages are not covered.


      cvss
      0.0
      low

      severity out of 10

      epss
      0.00%
      low

      chance of exploitation in 30 days, 16th percentile of all CVEs

      xyz score
      not scored

      CyberXYZ composite out of 10

      fig. 01 — GHSA-xf85-363p-868w, the advisory selected below

      // 1 advisories

      GHSA-xf85-363p-868w

      LOWCVE-2026-48978
      // 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.

      // cvss v4.0 vector

      CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

      Attack vector
      Network
      Attack complexity
      High
      Attack requirements
      None
      Privileges required
      None
      User interaction
      Active
      Confidentiality (vulnerable system)
      Low
      Integrity (vulnerable system)
      None
      Availability (vulnerable system)
      None
      Confidentiality (subsequent systems)
      None
      Integrity (subsequent systems)
      None
      Availability (subsequent systems)
      None

      Checked 2026-09-26 at 01:05 UTC. The most recent advisory here was published 2026-07-01. Updated continuously from NVD, GHSA, OSV and CNA feeds.

      Think a verdict here is wrong? Tell us — we respond within 2 business days.