Skip to main content

oras-go CVE-2026-50162

| EUVDEUVD-2026-45262 MEDIUM
External Control of File Name or Path (CWE-73)
2026-07-01 https://github.com/oras-project/oras-go GHSA-8xwf-rjm4-xvhv
6.9
CVSS 4.0 · Vendor: https://github.com/oras-project/oras-go
Share

Severity by source

Vendor (https://github.com/oras-project/oras-go) PRIMARY
6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
6.9 MEDIUM

Network delivery of malicious OCI artifact (AV:N); symlink prerequisite in workingDir raises complexity (AC:H); no victim-system privileges needed (PR:N); victim must pull artifact (UI:R); write escapes workingDir boundary into broader filesystem (S:C); no read impact (C:N); arbitrary file write is high integrity (I:H); incidental overwrite risk (A:L).

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:L
4.0 AV:N/AC:H/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
SUSE
5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Red Hat
5.3 MEDIUM
qualitative

Primary rating from Vendor (https://github.com/oras-project/oras-go).

CVSS VectorVendor: https://github.com/oras-project/oras-go

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

2
CVSS changed
Jul 17, 2026 - 20:22 NVD
6.9 (MEDIUM)
Analysis Generated
Jul 01, 2026 - 22:21 vuln.today

DescriptionCVE.org

The file content store in oras-go attempts to confine writes to workingDir when AllowPathTraversalOnWrite=false, but the guard is lexical and does not account for symlink traversal. If workingDir contains a symlink path component and an attacker-controlled blob title (via ocispec.AnnotationTitle) targets a path under that symlink, pushFile() can create a file outside workingDir.

relevant links

  • repository: https://github.com/oras-project/oras-go
  • commit: 03243809936cce826494b5506f724c6dc11115b1
  • callsite: content/file/file.go:609 resolveWritePath() (used by pushFile())

vulnerability details

pins: oras-project/oras-go@03243809936cce826494b5506f724c6dc11115b1

as-of: 2026-02-17

policy: GitHub Security Advisory (oras-project/oras-go)

callsite: content/file/file.go:609 resolveWritePath()pushFile()

attacker control: Attacker controls the pushed name (ocispec.AnnotationTitle) and can select a path with a symlink path component under workingDirresolveWritePath() blocks .. via filepath.Rel but does not prevent symlink traversal → pushFile() opens/creates the final path and follows the symlink → a file is created outside workingDir

root cause

resolveWritePath() enforces the write boundary using a filepath.Rel-style check against workingDir. This prevents ../ escapes but is purely lexical and does not resolve symlinks. If a path component under workingDir is a symlink to an external location, the subsequent filesystem operation in pushFile() follows that symlink and performs the write outside workingDir while still passing the lexical boundary check.

attack path

  1. Attacker provides a blob title (via ocispec.AnnotationTitle) that contains a path like out/pwn.txt.
  2. Victim uses oras-go file store with AllowPathTraversalOnWrite=false and a workingDir that contains a symlink directory out -> /some/outside/dir.
  3. The lexical boundary check accepts out/pwn.txt as being under workingDir.
  4. The write follows the symlink and creates /some/outside/dir/pwn.txt.

impact

This is a filesystem boundary bypass that permits writes outside workingDir when a symlink path component exists under workingDir. The concrete security impact depends on the runtime environment (what filesystem locations are writable by the process and what downstream consumers do with the written file), but the intended confinement guarantee is violated.

proof of concept

the attached poc.zip contains a small, self-contained go harness that demonstrates:

  • canonical (vulnerable): prints [CALLSITE_HIT] and [PROOF_MARKER] and shows the file is created outside workingDir
  • control (no symlink component): prints [NC_MARKER] and confirms no outside write occurs

run:

bash
unzip -q -o poc.zip -d /tmp
cd /tmp/poc-F-ORAS-SYMLINK-WRITE-001
make test

expected: when AllowPathTraversalOnWrite=false, file store writes should not be able to escape workingDir, including via symlink traversal.

actual: A symlink path component under workingDir allows writes to escape workingDir even when AllowPathTraversalOnWrite=false.

recommended fix

ensure confinement checks account for symlink traversal. Options include rejecting symlinks in any path component (walk components with os.Lstat), validating the resolved parent directory via EvalSymlinks and enforcing it remains under the resolved workingDir, or using an openat()-style approach so the check and open happen relative to a trusted directory file descriptor.

fix accepted when: The canonical PoC no longer prints [PROOF_MARKER] for the same attacker-controlled inputs.

cheers, Oleh

AnalysisAI

Symlink traversal in oras-go's file content store allows writes outside the intended workingDir boundary even when AllowPathTraversalOnWrite=false. Applications that pull OCI artifacts from untrusted registries where an attacker controls blob titles (ocispec.AnnotationTitle) are at risk if any directory component under workingDir is a symlink pointing to an external path. No confirmed active exploitation (not in CISA KEV), but a self-contained proof-of-concept was included in the researcher's disclosure, making reproduction straightforward given the prerequisites.

Technical ContextAI

oras-go is the canonical Go library implementing OCI Registry As Storage (ORAS), used by tooling that reads and writes OCI artifacts to and from registries. The vulnerable codepath is content/file/file.go:609 inside resolveWritePath(), which is invoked by pushFile() during blob materialization. When a blob is written to the file store, resolveWritePath() enforces the workingDir confinement boundary using a filepath.Rel-style lexical comparison to reject ../ escapes (CWE-73: External Control of File Name or Path). Critically, this check operates purely on the string representation of the path and never calls filepath.EvalSymlinks() or walks components with os.Lstat. Consequently, a path like out/pwn.txt clears the lexical guard even if out is a symlink to /external/dir; the subsequent os.Open/os.Create call in pushFile() follows the symlink at the OS level, materializing the file at /external/dir/pwn.txt. The affected package is oras.land/oras-go/v2 (CPE: pkg:go/oras.land_oras-go_v2).

RemediationAI

The upstream fix is available at commit cc323e564d90c6b5b4bdd71d3c8d2ee2713b37e5 (https://github.com/oras-project/oras-go/commit/cc323e564d90c6b5b4bdd71d3c8d2ee2713b37e5); consumers should update their go.mod to a tagged release that includes this commit - verify inclusion via git log against the fix SHA, as a specific released version number is not confirmed in the available advisory data. As a compensating control, audit workingDir for symlink components using find $workingDir -type l and replace any symlink directories with real directories; this eliminates the traversal surface entirely without a library update, though it requires ongoing operational governance to enforce. A second mitigation is to restrict OCI pulls exclusively to internal, access-controlled registries, preventing attacker-controlled ocispec.AnnotationTitle values from reaching the vulnerable codepath - note this has the trade-off of blocking legitimate third-party artifact consumption. Do not rely on AllowPathTraversalOnWrite=false alone as a security boundary until the fix is applied, as this flag's protection is currently bypassed by symlink traversal.

CVE-2012-0217 HIGH POC
7.2 Jun 12

The x86-64 kernel system-call functionality in Xen 4.1.2 and earlier, as used in Citrix XenServer 6.0.2 and earlier and

CVE-2026-33309 CRITICAL POC
9.9 Mar 19

An authenticated path traversal vulnerability in Langflow's file upload functionality allows attackers to write arbitrar

CVE-2026-48753 CRITICAL POC
9.9 Jun 26

Arbitrary host file write in Incus before 7.1.0 lets a holder of S3 bucket credentials escape the storage volume via a p

CVE-2019-7304 CRITICAL POC
9.8 Apr 23

Canonical snapd before version 2.37.1 incorrectly performed socket owner validation, allowing an attacker to run arbitra

CVE-2026-33186 CRITICAL POC
9.1 Mar 18

An authorization bypass vulnerability in gRPC-Go allows attackers to circumvent path-based access control by sending HTT

CVE-2026-53727 HIGH POC
8.9 Jul 09

Server-side request forgery in the Ruby css_parser gem (< 3.0.0) lets a remote unauthenticated attacker force the parsin

CVE-2026-50180 HIGH POC
8.7 Jul 02

Arbitrary file read in Langroid's SQLChatAgent (<= 0.63.0) lets an attacker who can influence the LLM-generated SQL exfi

CVE-2026-49852 HIGH POC
8.7 Jul 02

Authentication bypass in the joserfc Python JOSE/JWT library (PyPI, versions <= 1.6.7) lets unauthenticated attackers fo

CVE-2026-55245 HIGH POC
8.7 Aug 28

SSRF in the Bifrost AI gateway's multimodal URL-fetch path permits any client that can submit a Bedrock or Vertex provid

CVE-2026-52776 HIGH POC
8.6 Aug 12

URLSecurityValidator SSRF bypass in compliance-trestle <= 4.0.3 allows a network-positioned attacker to reach cloud meta

CVE-2026-71309 HIGH POC
8.6 Aug 05

Path traversal in rclone's `serve restic` REST API allows any attacker with network access to the endpoint to read, crea

CVE-2026-48595 HIGH POC
8.2 Jun 02

Credential leakage in elixir-tesla (Tesla HTTP client for Elixir) versions 1.4.0 through 1.18.2 allows Authorization and

Vendor StatusVendor

SUSE

Severity: Moderate

Share

CVE-2026-50162 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy