{"id":"CVE-2026-85732","aliases":["CVE-2026-85732","GHSA-h7vf-4x9w-h99v","GO-2026-6497"],"related":[],"kind":"vulnerability","state":"published","title":"oras-go: Blind SSRF via unvalidated Link header URL in pagination allows internal network probing","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Summary\n\noras-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.\n\nThis affects all pagination-based listing operations: Tags, Referrers, and Repositories (catalog).\n\n## Root Cause\n\n`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.\n\n## Affected Code Paths\n\n- `registry/remote/repository.go:Tags()` calls `parseLink()` for next page URL\n- `registry/remote/repository.go:Referrers()` calls `parseLink()` for next page URL\n- `registry/remote/registry.go:Repositories()` calls `parseLink()` for next page URL\n\n## Impact\n\n**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:\n\n- Cloud instance metadata endpoints for service discovery and IAM role enumeration\n- Internal HTTP services for port scanning and triggering side effects\n- 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)\n\nThe 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.\n\n## Attack Chain\n\n1. Victim calls `repo.Tags()` / `repo.Referrers()` / `registry.Repositories()` against attacker-controlled registry\n2. Registry returns a valid first page + malicious Link header pointing to an internal endpoint\n3. `parseLink()` extracts the absolute URL with zero validation\n4. Pagination loop makes GET request to the internal endpoint from victim's network\n\n## PoC\n\n<details>\n<summary>Expand PoC</summary>\n\n```go\n// Malicious registry handler for /v2/repo/tags/list:\nfunc handler(w http.ResponseWriter, r *http.Request) {\n    // Link header points to cloud metadata or internal service\n    w.Header().Set(\"Link\", `<http://internal-service:8080/admin>; rel=\"next\"`)\n    w.Header().Set(\"Content-Type\", \"application/json\")\n    json.NewEncoder(w).Encode(map[string][]string{\"tags\": {\"v1\"}})\n}\n\n// Victim code:\nrepo, _ := remote.NewRepository(\"attacker-registry.io/repo\")\nrepo.Tags(ctx, \"\", func(tags []string) error { return nil })\n// Result: GET http://internal-service:8080/admin is made from victim's network\n```\n\n</details>\n\n## Suggested Fix\n\nValidate 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.\n\nReported by **zx (Jace)**","format":"markdown","source":"ghsa"},{"lang":"en","text":"Blind SSRF via unvalidated Link header URL in pagination allows internal network probing in oras.land/oras-go","format":"markdown","source":"go"}],"published":"2026-09-16T16:22:14.881Z","modified":"2026-10-01T20:55:52.275Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N","score":4.7,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N","score":4.7,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N","score":4.7,"rating":"MEDIUM"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":"< 2.6.2","status":"affected"}],"vendor":"oras-project","product":"oras-go","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.6.2"}],"ecosystem":"Go","package":"oras.land/oras-go/v2","purl":"pkg:golang/oras.land/oras-go/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.6.2"}],"ecosystem":"Go","package":"oras.land/oras-go/v2","purl":"pkg:golang/oras.land/oras-go/v2","source":"go"}],"references":[{"url":"https://github.com/oras-project/oras-go/security/advisories/GHSA-h7vf-4x9w-h99v","tags":["advisory","exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/oras-project/oras-go/commit/31da1963f8c327dd089cd29faeae95cf0fc50842","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/oras-project/oras-go/releases/tag/v2.6.2","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-85732","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/oras-project/oras-go","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-09-16T17:29:34.362Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-85732","url":"https://www.cve.org/CVERecord?id=CVE-2026-85732","licence":"CVE Terms of Use","modified":"2026-09-16T17:29:51.661Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h7vf-4x9w-h99v","url":"https://github.com/advisories/GHSA-h7vf-4x9w-h99v","licence":"CC-BY-4.0","modified":"2026-10-01T20:55:52.275Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6497","url":"https://pkg.go.dev/vuln/GO-2026-6497","licence":"CC-BY-4.0","modified":"2026-10-01T20:45:12.219Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-85732","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-85732","licence":"Public domain","modified":"2026-09-16T18:17:18.070Z"}],"updatedAt":"2026-11-25T22:59:39.081Z","epss":{"score":0.00384,"percentile":0.346,"date":"2026-12-01T12:00:22.000Z"}}