CVE-2026-85731: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in oras-project oras-go
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.
AI Analysis
Technical Summary
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.
CVE-2026-85731: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in oras-project 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
Affected software
oras-project
oras-go
pkg:golang/github.com/oras-project/oras-goRun 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
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.