Skip to main content

CVE-2026-85731: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in oras-project oras-go

0
High
VulnerabilityCVE-2026-85731cvecve-2026-85731cwe-22cwe-59
Published: 09/16/2026 (09/16/2026, 16:24:48 UTC)
Source: CVE Database V5
Vendor/Project: oras-project
Product: oras-go

Description

oras-go is a Go library for managing OCI artifacts. Prior to 2.6.2, content/file.Store extraction of OCI layers marked with io.deis.oras.content.unpack=true can write outside the store working directory. The pushDir path through extractTarDirectory and ensureLinkPath validates symlink targets lexically, resolveRelToBase skips its parent-symlink walk for root-level entries, and writeFile follows a terminal symlink when opening a regular file. A malicious archive can therefore create a symlink chain whose lexical target remains inside the extraction root but whose resolved target is an attacker-selected absolute path, then overwrite that target with a same-named regular-file entry even when AllowPathTraversalOnWrite is false. Pulling an attacker-controlled artifact can create or overwrite any file writable by the process and may lead to code execution. This issue is fixed in version 2.6.2.

CVSS v3.1

Score 8.8high

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

Affected software

oras-project

oras-go

Affected versions
<2.6.2
github.com/oras-project/oras-go
pkg:golang/github.com/oras-project/oras-go
Affected versions
<2.6.2

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/16/2026, 17:46:28 UTC

Technical Analysis

The oras-go library versions before 2.6.2 contain a path traversal vulnerability (CWE-22) in the content/file.Store extraction process. Specifically, when extracting OCI layers marked with io.deis.oras.content.unpack=true, the library's path validation logic can be bypassed by a malicious archive that creates a symlink chain. Although the lexical target remains inside the extraction root, the resolved absolute path points outside, allowing an attacker to overwrite arbitrary files writable by the process. This occurs because resolveRelToBase skips parent-symlink walks for root-level entries and writeFile follows terminal symlinks when opening files. This vulnerability can lead to arbitrary file overwrite and potential code execution. The flaw is addressed in version 2.6.2.

Potential Impact

An attacker who can supply a malicious OCI artifact can cause the oras-go library to overwrite arbitrary files on the host filesystem with the privileges of the process running oras-go. This can lead to code execution or other severe impacts depending on the overwritten files. The vulnerability has a high CVSS score of 8.8, reflecting its critical impact on confidentiality, integrity, and availability.

Mitigation Recommendations

Upgrade to oras-go version 2.6.2 or later, where this path traversal vulnerability is fixed. No other mitigations are specified. Patch status is confirmed by the vendor advisory stating the issue is fixed in 2.6.2.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-09-04T14:45:10.649Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6aaad2a255bf5e2cf5efca5e

Added to database: 09/16/2026, 17:32:18 UTC

Last enriched: 09/16/2026, 17:46:28 UTC

Last updated: 09/17/2026, 01:19:34 UTC

Views: 8

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses