# CVE-2026-85731: oras-go: Arbitrary file write outside file.Store root via symlink-chain bypass in tar extraction (pushDir)

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.68%, higher than 53% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-09-16T16:24:48.905Z
- Modified: 2026-10-01T20:55:50.398Z
- Also known as: GHSA-m37j-52j7-pjw7, GO-2026-6499
- Weaknesses: CWE-22, CWE-59
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- oras-project oras-go: < 2.6.2
- oras.land/oras-go/v2 (Go): before 2.6.2

## Every score

- GitHub_M: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/oras-project/oras-go/security/advisories/GHSA-m37j-52j7-pjw7> (exploit, advisory, web)
- <https://github.com/oras-project/oras-go/commit/adab2f25ea95ef4e6e41f50db9266a6701399422> (web)
- <https://github.com/oras-project/oras-go/releases/tag/v2.6.2> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-85731> (advisory)
- <https://github.com/oras-project/oras-go> (package)

## Sources

- CVE List: [CVE-2026-85731](https://www.cve.org/CVERecord?id=CVE-2026-85731), CVE Terms of Use, modified 2026-09-16
- GitHub Advisory Database: [GHSA-m37j-52j7-pjw7](https://github.com/advisories/GHSA-m37j-52j7-pjw7), CC-BY-4.0, modified 2026-10-01
- Go Vulnerability Database: [GO-2026-6499](https://pkg.go.dev/vuln/GO-2026-6499), CC-BY-4.0, modified 2026-10-01
- NVD: [CVE-2026-85731](https://nvd.nist.gov/vuln/detail/CVE-2026-85731), Public domain, modified 2026-09-16

---

Page: https://cve.day/CVE-2026-85731 · Whole record: https://cve.day/CVE-2026-85731.json · Rebuilt by cve.day 2026-11-25T22:59:39.080Z
