GHSA-h7vf-4x9w-h99v: SSRF

Published Sep 17, 2026
·
Updated

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)

Affected Software

1 affected componentFixes available
go/oras.land/oras-go/v2<=2.6.1
2.6.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/oras.land/oras-go/v2 to a version that resolves this vulnerability.

    Fixed in 2.6.2

Event History

Sep 17, 2026
Advisory Published
via GitHub·05:16 PM
Data Sourced
via GitHub·05:16 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which application workflows are exposed?

Applications using oras-go v2 to perform paginated Tags, Referrers, or Repositories (catalog) listing operations against a malicious registry are exposed. The registry can influence the URL requested for the next page.

2

What must an attacker control to exploit this issue?

An attacker needs a registry that returns a Link response header containing an absolute URL to an attacker-chosen host or scheme. When the client follows pagination, it sends a GET request to that destination from the victim's network.

3

What network access can the attacker cause?

The client can be induced to make GET requests to arbitrary hosts, including cloud metadata endpoints, from the network where the oras-go consumer runs. The provided data does not indicate any host comparison, scheme validation, or IP filtering before the request is made.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203