# CVE-2026-50151: oras-project oras-go Credential Leak via Unvalidated Location Header

Source: https://junglewise.ai/threats/cve-2026-50151-oras-project-oras-go-credential-leak-via-unvalidated-location  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-17. Updated: 2026-07-17  
License: CC BY 4.0 with a link back

CVE-2026-50151 · Severity: high · CVSS 7.5 · Published 2026-07-17

oras-go is a software library used by developers to manage and move cloud-native artifacts (like container images) between different storage registries. A security flaw allows a malicious or compromised registry to trick the library into sending the user's private login credentials to a server controlled by an attacker. This could lead to the theft of sensitive access tokens or passwords used to manage corporate cloud infrastructure.

Technologies: [oras.land/oras-go/v2 (Go)](https://junglewise.ai/threats/technologies/oras-land-oras-go-v2), [ORAS Project Oras-Go](https://junglewise.ai/threats/technologies/oras-go). Vendors: [Go](https://junglewise.ai/threats/vendors/go), [ORAS Project](https://junglewise.ai/threats/vendors/oras-project).

## Quick answers

**Is CVE-2026-50151 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-50151 being exploited in the wild.

**How severe is CVE-2026-50151?** High severity, with a CVSS score of 7.5, published 17 July 2026.

**Which products and versions are affected?** oras.land/oras-go/v2 (Go) < 2.6.1, SEMVER:introduced=0,fixed=2.6.1; ORAS Project Oras-Go < 2.6.1.

**Is there a fix for CVE-2026-50151?** Yes. oras.land/oras-go/v2 (Go): upgrade to 2.6.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-50151 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-50151?** Check whether you run oras.land/oras-go/v2 (Go) or ORAS Project Oras-Go at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- oras.land/oras-go/v2 (Go): upgrade to 2.6.1 or later

  ```sh
  go get oras.land/oras-go/v2@v2.6.1
  ```


## Technical details

A Server-Side Request Forgery (SSRF) and credential leak vulnerability exists in oras-go's 'blobStore.completePushAfterInitialPost' function within 'registry/remote/repository.go'. During a monolithic blob upload, the library follows a registry-provided 'Location' header and reuses the 'Authorization' header from the initial POST request for the subsequent PUT request. An attacker-controlled registry can return a cross-host 'Location' header, causing the library to forward the caller's credentials to an arbitrary external endpoint. The fix, introduced in version 2.6.1, validates that the redirect host matches the original request host and prevents scheme downgrades (HTTPS to HTTP).

## Affected products

- oras-project oras-go < 2.6.1

## Identifiers

- CVE-2026-50151
- GHSA-jxpm-75mh-9fp7
- GO-2026-5882

## Timeline

- 2026-04-26: patched: Fix merged into repository
- 2026-06-08: advisory: Release v2.6.1 published
- 2026-07-17: disclosed: CVE published to NVD

## References

- [https://github.com/oras-project/oras-go/commit/4683c46ef078091544f5f55fd25102f002806991](https://github.com/oras-project/oras-go/commit/4683c46ef078091544f5f55fd25102f002806991)
- [https://github.com/oras-project/oras-go/pull/1152](https://github.com/oras-project/oras-go/pull/1152)
- [https://github.com/oras-project/oras-go/releases/tag/v2.6.1](https://github.com/oras-project/oras-go/releases/tag/v2.6.1)
- [https://github.com/oras-project/oras-go/security/advisories/GHSA-jxpm-75mh-9fp7](https://github.com/oras-project/oras-go/security/advisories/GHSA-jxpm-75mh-9fp7)

## Related threats

- [ORAS-Go blind SSRF via unvalidated Link header in pagination](https://junglewise.ai/threats/cve-2026-85732-oras-go-blind-ssrf-via-unvalidated-link-header-in-pagination)
- [oras-go arbitrary file write via symlink-chain bypass in tar extraction](https://junglewise.ai/threats/cve-2026-85731-oras-go-arbitrary-file-write-via-symlink-chain-bypass-in-tar)
- [GO-2026-5884 - ORAS Go forwards registry credentials across registry redirects in oras.land/oras-go](https://junglewise.ai/threats/go-2026-5884-oras-go-forwards-registry-credentials-across-registry-0c83b8d7)
- [oras-project oras-go path traversal via hardlink resolution](https://junglewise.ai/threats/cve-2026-50163-oras-project-oras-go-path-traversal-via-hardlink-resolution)
- [oras-project oras-go path traversal via symlink in resolveWritePath](https://junglewise.ai/threats/cve-2026-50162-oras-project-oras-go-path-traversal-via-symlink-in)
