CVE-2026-50162 oras-go: file store write outside workingDir via symlink traversal

Medium 6.9 Published Updated

An attacker can write files outside the intended working directory via symlink traversal in the oras-go library, potentially overwriting arbitrary files.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-50162?

CVE-2026-50162 is a medium-severity path traversal vulnerability in oras-project oras-go, published on 17 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

oras-go is a Go library for managing OCI artifacts. Prior to 2.6.1, resolveWritePath() in content/file/file.go uses a lexical filepath.Rel check for workingDir and does not account for symlink traversal, so when AllowPathTraversalOnWrite=false an attacker-controlled blob title through ocispec.AnnotationTitle such as out/pwn.txt can follow a workingDir symlink out -> /some/outside/dir and cause pushFile() to create /some/outside/dir/pwn.txt outside workingDir. This issue is fixed in version 2.6.1.

Weakness: CWE-73

Which versions are affected by CVE-2026-50162?

3 open source packages ship an affected version, including oras.land/oras-go/v2.

PackageAffectedFixed in
oras.land/oras-go/v2 GoAll versions2.6.1
oras.land/oras-go/v2 GoAll versions2.6.1
oras.land/oras-go/v2 GoAll versions2.6.1

How do I fix CVE-2026-50162?

Upgrade oras.land/oras-go/v2 to 2.6.1 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-50162 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-50162 exists.

Sources

Also known as CLEANSTART-2026-BJ99238, CLEANSTART-2026-XC86344, DEBIAN-CVE-2026-50162, GHSA-8xwf-rjm4-xvhv, GO-2026-5879, MINI-22r6-mj52-7h6r and 193 more.

Is CVE-2026-50162 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free