Skip to content

fix(deps): update module oras.land/oras-go to v2 [security] - #1025

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/go-oras.land-oras-go-vulnerability
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/go-oras.land-oras-go-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
oras.land/oras-go v1.2.7 → v2.0.0 age confidence

oras-go: Malicious registry can hijack Bearer token realm to exfiltrate credentials and refresh tokens

CVE-2026-48978 / GHSA-xf85-363p-868w / GO-2026-5885

More information

Details

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):

  1. 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.

  2. 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.

Severity

  • CVSS Score: 2.1 / 10 (Low)
  • Vector String: 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

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Release Notes

oras-project/oras-go (oras.land/oras-go)

v2.0.0

Compare Source

Brand New V2 Library

What's New

In version v2, ORAS Go library has been completely refreshed with:

  • More unified interfaces
  • Notably fewer dependencies
  • Higher test coverage
  • Better documentation
  • Balanced security and performance

Besides, ORAS Go v2 is now a registry client conforming image-spec v1.1.0-rc.2 and distribution-spec v1.1.0-rc1.

In ORAS Go v2, artifacts are modeled as Directed Acyclic Graphs (DAGs) stored in Content-Addressable Storages (CASs). Copying artifacts across repositories or generic targets is implemented as copying single-rooted DAGs across CASs. By extending the copy operation, ORAS Go v2 further supports copying underlying DAGs identified by a specific node. For instance, copying a signed artifact with its signatures across repositories.

Documentation and examples are available at pkg.go.dev.

Deprecation

Docker based key management is no longer supported. Credentials are required to be supplied to auth.Client for authentication. Related discussion can be found at #​413.

Migration From v1

See MIGRATION_GUIDE.md.

What's Changed Since RC.6

New Features

Bug Fixes

  • fix #​395: oras.Tag() and oras.TagN() should return a descriptor
  • fix #​402: file.Store fails to extract folder containing symbolic links
  • fix #​404: oci.Store and file.Store should record an absolute path instead of a relative path for root

Deprecation

  • BREAKING CHANGE: Interface registry.ReferrerFinder is renamed to registry.ReferrerLister
  • BREAKING CHANGE: Remove file.PackFiles()

Other Changes

Detailed Commits

Full Changelog: oras-project/oras-go@v2.0.0-rc.6...v2.0.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added dependencies Pull requests that update a dependency file renovate PR created by RenovateBot labels Nov 2, 2026
@renovate
renovate Bot requested a review from a team as a code owner November 2, 2026 17:52
@renovate

renovate Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
go: downloading github.com/stretchr/objx v0.5.3
go: finding module for package oras.land/oras-go/v2/v2/pkg/content
go: downloading oras.land/oras-go/v2 v2.0.0
go: finding module for package oras.land/oras-go/v2/v2/pkg/oras
go: finding module for package oras.land/oras-go/v2/v2/pkg/registry
go: github.com/giantswarm/helmclient/v4/pkg/helmclient imports
	oras.land/oras-go/v2/v2/pkg/content: module oras.land/oras-go/v2@latest found (v2.7.0, replaced by oras.land/oras-go/v2@v2.0.0), but does not contain package oras.land/oras-go/v2/v2/pkg/content
go: github.com/giantswarm/helmclient/v4/pkg/helmclient imports
	oras.land/oras-go/v2/v2/pkg/oras: module oras.land/oras-go/v2@latest found (v2.7.0, replaced by oras.land/oras-go/v2@v2.0.0), but does not contain package oras.land/oras-go/v2/v2/pkg/oras
go: github.com/giantswarm/helmclient/v4/pkg/helmclient imports
	oras.land/oras-go/v2/v2/pkg/registry: module oras.land/oras-go/v2@latest found (v2.7.0, replaced by oras.land/oras-go/v2@v2.0.0), but does not contain package oras.land/oras-go/v2/v2/pkg/registry

@renovate
renovate Bot force-pushed the renovate/go-oras.land-oras-go-vulnerability branch 2 times, most recently from 1ea6ad0 to 5da6aea Compare November 4, 2026 22:06
@renovate
renovate Bot force-pushed the renovate/go-oras.land-oras-go-vulnerability branch from 5da6aea to d45b208 Compare November 22, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file renovate PR created by RenovateBot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants