CVE-2026-85732: oras-go: Blind SSRF via unvalidated Link header URL in pagination allows internal network probing
Summary
oras-go's pagination helper parseLink() in registry/remote/utils.go follows the Link response header from a registry without validating the URL's host or scheme. When a malicious registry returns a Link header containing an absolute URL pointing to an arbitrary host (e.g., a cloud metadata endpoint), the client makes GET requests to that host from the victim's network.
This affects all pagination-based listing operations: Tags, Referrers, and Repositories (catalog).
Root Cause
parseLink() at registry/remote/utils.go:54 calls resp.Request.URL.Parse(link) which, for absolute URLs, returns the absolute URL unchanged. The result is passed directly to the next pagination loop iteration where http.NewRequestWithContext() creates a GET request to the attacker-specified URL. No host comparison, scheme validation, or IP filtering exists between parseLink output and the HTTP request.
Affected Code Paths
- registry/remote/repository.go:Tags() calls parseLink() for next page URL - registry/remote/repository.go:Referrers() calls parseLink() for next page URL - registry/remote/registry.go:Repositories() calls parseLink() for next page URL
Impact
Blind SSRF from the victim's network. A malicious registry operator can force any oras-go client that lists tags, referrers, or repositories to issue GET requests to arbitrary internal endpoints:
- Cloud instance metadata endpoints for service discovery and IAM role enumeration - Internal HTTP services for port scanning and triggering side effects - If the victim's credential store maps credentials for the SSRF target host, those credentials are attached to the request (auth.Client looks up creds by request host)
The attacker cannot read the response body (it's parsed as JSON and fails), making this a blind SSRF. However, timing and error differences can confirm internal service existence.
Attack Chain
1. Victim calls repo.Tags() / repo.Referrers() / registry.Repositories() against attacker-controlled registry 2. Registry returns a valid first page + malicious Link header pointing to an internal endpoint 3. parseLink() extracts the absolute URL with zero validation 4. Pagination loop makes GET request to the internal endpoint from victim's network
PoC
<details> <summary>Expand PoC</summary>
go // Malicious registry handler for /v2/repo/tags/list: func handler(w http.ResponseWriter, r http.Request) { // Link header points to cloud metadata or internal service w.Header().Set("Link", <http://internal-service:8080/admin>; rel="next") w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(map[string][]string{"tags": {"v1"}}) }
// Victim code: repo, := remote.NewRepository("attacker-registry.io/repo") repo.Tags(ctx, "", func(tags []string) error { return nil }) // Result: GET http://internal-service:8080/admin is made from victim's network
</details>
Suggested Fix
Validate that the URL returned by parseLink() has the same host and scheme as the original request before using it for the next pagination request. Reject cross-host or scheme-downgrade URLs.
Reported by zx (Jace)
Other sources
oras-go is a Go library for managing OCI artifacts. Prior to 2.6.2, the parseLink function in registry/remote/utils.go accepts an absolute URL from a registry-controlled Link response header without validating its scheme, host, or port. Tags, Referrers, and Repositories pagination operations then issue a GET request to the attacker-selected URL from the victim's network, allowing blind server-side request forgery against internal services. The response body is not returned to the attacker, but timing and error differences can reveal service reachability, and credentials may be attached when the credential store has an entry for the target host. Exploitation requires a victim to perform a pagination-based listing operation against a malicious registry. The maintainer identifies this report as a duplicate of GHSA-3hr5-mjrr-hfjh and states that remediation is consolidated in that earlier advisory. The consolidated issue is fixed in version 2.6.2.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/oras.land/oras-go/v2to a version that resolves this vulnerability.Fixed in 2.6.2 - Upgrade
Upgrade
oras-goto a version that resolves this vulnerability.Fixed in 2.6.2 - Configuration
Update parseLink so that when parsing the registry-provided Link header (next page URL), it validates the returned URL from resp.Request.URL.Parse(link) and rejects/ignores URLs that do not match the original request's host and scheme before it is used for the next pagination GET (used by Repositories(), Referrers(), and Tags()).
oras-go pagination helper parseLink (registry/remote/utils.go) Link header next-page URL validation = same host and scheme as original request (reject absolute URLs with different host/scheme)
Event History
Frequently Asked Questions
Who is exposed to exploitation?
Applications using oras-go before 2.6.2 are exposed when they perform Tags, Referrers, or Repositories pagination against a malicious registry. The attacker does not need credentials or prior privileges, but must induce the victim application to run one of those listing operations.
What can an attacker learn or access through this issue?
The attacker can cause the victim to send GET requests to attacker-selected internal or external URLs, enabling blind probing of services reachable from the victim network. Response bodies are not returned, but timing and error differences can indicate reachability; credentials may also be attached if the credential store has an entry for the selected target host.
Are normal listing operations affected?
The affected behavior is specifically pagination-based listing for tags, referrers, and repositories, where a registry-controlled Link header supplies the next URL. A malicious registry can provide an absolute URL with an unvalidated scheme, host, or port.
What is the remediation?
Upgrade oras-go to version 2.6.2, which contains the consolidated fix. The maintainer identifies this report as a duplicate of GHSA-3hr5-mjrr-hfjh and states remediation is consolidated in that earlier advisory.