{"id":"CVE-2026-85731","published":"2026-09-16T16:24:48Z","modified":"2026-09-16T17:25:07Z","title":"oras-go: Arbitrary file write outside file.Store root via symlink-chain bypass in tar extraction (pushDir)","vendor":"oras-project","product":"oras-go","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0063,"percentile":0.44672,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"id":"CWE-59","name":"Improper Link Resolution Before File Access"}],"references":[{"url":"https://github.com/oras-project/oras-go/security/advisories/GHSA-m37j-52j7-pjw7","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/oras-project/oras-go/commit/adab2f25ea95ef4e6e41f50db9266a6701399422","tags":["x_refsource_MISC"]},{"url":"https://github.com/oras-project/oras-go/releases/tag/v2.6.2","tags":["x_refsource_MISC"]}],"priority":{"score":15.1,"factors":[{"name":"EPSS percentile","points":8.93},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"oras-project","affectedVersions":[{"vendor":"oras-project","product":"oras-go","versions":["< 2.6.2"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-09-16T17:24:00.719255Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"oras.land/oras-go/v2","vulnerableRanges":["<2.6.2"],"patched":["2.6.2"],"from":["GHSA-m37j-52j7-pjw7","GO-2026-6499"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-80873","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-oras-project-oras-go-cve-2026-50163","parents":[{"from":"CVE-2026-50163","to":"CVE-2026-85731","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["content/file/utils.go"],"commits":["https://github.com/oras-project/oras-go/commit/c463c654ab3ef34422c1764cd619806cebf20451","https://github.com/oras-project/oras-go/commit/b11f777f8d405c5023c4b307cfdc5068dfc3d406","https://github.com/oras-project/oras-go/commit/adab2f25ea95ef4e6e41f50db9266a6701399422"],"basis":"shared function","functions":["extractTarDirectory"]}]}],"packageHistory":[{"cve":"CVE-2026-48978","published":"2026-07-17","fixed":"2.6.1","kev":false,"link":{"from":"CVE-2026-48978","to":"CVE-2026-85731","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:oras.land/oras-go/v2","fromFixed":"2.6.1","toFixed":"2.6.2","daysApart":61}]}},{"cve":"CVE-2026-50151","published":"2026-07-17","fixed":"2.6.1","kev":false},{"cve":"CVE-2026-50162","published":"2026-07-17","fixed":"2.6.1","kev":false},{"cve":"CVE-2026-50163","published":"2026-07-17","fixed":"2.6.2","kev":false},{"cve":"CVE-2026-85731","published":"2026-09-16","fixed":"2.6.2","kev":false},{"cve":"CVE-2026-85732","published":"2026-09-16","fixed":"2.6.2","kev":false}],"package":"Go:oras.land/oras-go/v2"}}