CVE-2026-50151: oras-go: credential forwarding via unvalidated Location header in blob upload

Published Jul 1, 2026
·
Updated

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)

Other sources

oras-go is a Go library for managing OCI artifacts. Prior to 2.6.1, registry/remote/repository.go in blobStore.completePushAfterInitialPost follows a registry-controlled Location header during monolithic blob upload and reuses the Authorization header from the initial POST request for the subsequent PUT request, allowing a malicious registry to return a cross-host Location and receive the caller's credentials at an attacker-controlled endpoint. This issue is fixed in version 2.6.1.

MITRE

Affected Software

2 affected componentsFixes available
go/oras.land/oras-go/v2<2.6.1
2.6.1
linuxfoundation Oras Go<2.6.1

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.1
  2. Upgrade

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

    Fixed in 2.6.1
  3. Configuration

    In blobStore.completePushAfterInitialPost, never forward the `Authorization` header when the upload target changes host or scheme; validate the returned `Location` before uploading (scheme + hostname + effective port) against the original request, or require an explicit opt-in allowlist for cross-host upload URLs.

    oras-go (registry/remote/repository.go blobStore.completePushAfterInitialPost) Authorization forwarding on cross-host Location = never

Event History

Jul 1, 2026
Advisory Published
via GitHub·09:35 PM
Data Sourced
via GitHub·09:35 PM
DescriptionSeverityWeaknessAffected Software
Jul 17, 2026
CVE Published
via MITRE·07:41 PM
Data Sourced
via MITRE·07:41 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Sep 1, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2026-50151?

CVE-2026-50151 has a high severity score of 7.5.

2

What are the potential risks associated with CVE-2026-50151?

CVE-2026-50151 allows for unauthorized access due to SSRF, potentially allowing attackers to send unauthorized requests.

3

How do I fix CVE-2026-50151?

To remediate CVE-2026-50151, update to the latest version of oras-go that includes the patch provided for this vulnerability.

4

What is the nature of the vulnerability in CVE-2026-50151?

CVE-2026-50151 is an SSRF vulnerability that can be exploited through controlled `Location` headers during blob uploads.

5

Which software is affected by CVE-2026-50151?

The vulnerability affects the oras-go software, specifically versions prior to the fix implemented in the latest updates.

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