CVE-2026-50151: Oras.land/oras go/v2 Oras-go Blob Upload Vulnerable To Vulnerability

HIGH
Advisory Identifier: GHSA-jxpm-75mh-9fp7
CVSS 7.5
CWE-918
Published
Advisory Summary

CVE-2026-50151 is a HIGH (CVSS 7.5) oras-go blob upload vulnerable to vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Oras.land/oras go/v2 libraries in the Go ecosystem. The issue involves oras-go blob upload vulnerable to credential forwarding via unvalidated location header. Remediation is available by upgrading affected packages to version 2.6.1.

CVE-2026-50151 at a Glance

CVE Identifier CVE-2026-50151
GHSA Identifier GHSA-jxpm-75mh-9fp7
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Oras.land/oras go/v2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-50151

To remediate this vulnerability, upgrade all affected Oras.land/oras go/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

oras.land/oras-go/v2 fixed: 2.6.1
Upgrade oras.land/oras-go/v2 to 2.6.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for oras.land/oras-go/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-50151, inspect your project dependencies for Oras.land/oras go/v2:

inspect dependencies for oras.land/oras-go/v2

Analyze the terminal output to locate any version of Oras.land/oras go/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.6.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Oras.land/oras go/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary oras-go follows a registry-controlled `Location` header during the monolithic blob upload flow and reuses the `Authorization` header from the initial `POST` request for the subsequent `PUT` request. If a malicious registry returns a cross-host `Location`, oras-go can send the caller's credentials to an attacker-controlled endpoint. ## Affected Versions tested: v2.6.0 (commit 03243809936cce826494b5506f724c6dc11115b1, as-of 2026-01-24) range: unknown; likely affects earlier v2.x releases that include the same upload flow ## Impact Credential leak to an attacker-controlled endpoint and client-side ssrf to a cross-host target. ## Affected Component - `registry/remote/repository.go:878-916` (`blobStore.completePushAfterInitialPost`) ## Reproduction Attachments include `poc.zip` with a local-only harness (no real registry required). It runs a fake registry server that returns a cross-host `Location` and a second server that records whether it received `Authorization`. ```bash unzip -q -o poc.zip -d /tmp/poc cd /tmp/poc/poc-F-ORAS-LOCATION-UPLOAD-001 make canonical make control ``` ## Recommended Fix - validate `Location` before uploading (scheme + hostname + effective port) against the original request, or require an explicit opt-in allowlist for cross-host upload urls - never forward `Authorization` when the upload target changes host or scheme ## references - security policy: https://github.com/oras-project/oras-go/security/policy - vulnerable code: `registry/remote/repository.go` (see `blobStore.completePushAfterInitialPost`)

CVE-2026-50151 Affected Oras.land/oras go/v2 Versions

1 component(s)
Fixed Versions:
2.6.1
Product / Package Ecosystem Affected Versions Fixed Version
oras.land/oras-go/v2
Go
< 2.6.1
2.6.1

References

Frequently Asked Questions

What is CVE-2026-50151?
CVE-2026-50151 is a security vulnerability in Oras.land/oras go/v2 involving oras-go blob upload vulnerable to credential forwarding via unvalidated Location header under CWE-918: Server-Side Request Forgery (SSRF).
Which Oras.land/oras go/v2 versions are affected?
Affected versions include releases prior to 2.6.1 across affected packages: oras.land/oras-go/v2.
What version fixes CVE-2026-50151?
Upgrading to 2.6.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is oras.land/oras-go/v2 affected?
Yes, oras.land/oras-go/v2 is affected in releases prior to 2.6.1. Upgrade your dependency to 2.6.1 or later.
What is the CVSS score of CVE-2026-50151?
CVE-2026-50151 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-50151?
CVE-2026-50151 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check Go dependencies for CVE-2026-50151?
Run the dependency tree command: 'inspect dependencies for oras.land/oras-go/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jxpm-75mh-9fp7",
  "modified" : "2026-07-01T21:35:45Z",
  "published" : "2026-07-01T21:35:45Z",
  "aliases" : [ "CVE-2026-50151" ],
  "summary" : "oras-go blob upload vulnerable to credential forwarding via unvalidated Location header",
  "details" : "## Summary\n\noras-go follows a registry-controlled `Location` header during the monolithic blob upload flow and reuses the `Authorization` header from the initial `POST` request for the subsequent `PUT` request. If a malicious registry returns a cross-host `Location`, oras-go can send the caller's credentials to an attacker-controlled endpoint.\n\n## Affected Versions\n\ntested: v2.6.0 (commit 03243809936cce826494b5506f724c6dc11115b1, as-of 2026-01-24)\nrange: unknown; likely affects earlier v2.x releases that include the same upload flow\n\n## Impact\n\nCredential leak to an attacker-controlled endpoint and client-side ssrf to a cross-host target.\n\n## Affected Component\n\n- `registry/remote/repository.go:878-916` (`blobStore.completePushAfterInitialPost`)\n\n## Reproduction\n\nAttachments include `poc.zip` with a local-only harness (no real registry required). It runs a fake registry server that returns a cross-host `Location` and a second server that records whether it received `Authorization`.\n\n```bash\nunzip -q -o poc.zip -d /tmp/poc\ncd /tmp/poc/poc-F-ORAS-LOCATION-UPLOAD-001\nmake canonical\nmake control\n```\n\n## Recommended Fix\n\n- validate `Location` before uploading (scheme + hostname + effective port) against the original request, or require an explicit opt-in allowlist for cross-host upload urls\n- never forward `Authorization` when the upload target changes host or scheme\n\n## references\n\n- security policy: https://github.com/oras-project/oras-go/security/policy\n- vulnerable code: `registry/remote/repository.go` (see `blobStore.completePushAfterInitialPost`)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "oras.land/oras-go/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.6.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/oras-project/oras-go/security/advisories/GHSA-jxpm-75mh-9fp7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/oras-project/oras-go/pull/1152"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/oras-project/oras-go/commit/4683c46ef078091544f5f55fd25102f002806991"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/oras-project/oras-go"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/oras-project/oras-go/releases/tag/v2.6.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-01T21:35:45Z",
    "nvd_published_at" : null
  }
}