Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. oras.land/oras-go/v2
  4. ›
  5. CVE-2026-85731

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

September 17, 2026

The content/file.Store in oras-go v2 unpacks OCI layer tarballs when a descriptor carries io.deis.oras.content.unpack=true. The extraction routine validates symlink targets purely lexically (filepath.Join) and, for regular files placed directly at the extraction root, skips the parent-symlink Lstat walk. A malicious tarball can plant a chain of symlinks whose lexical target stays inside the extraction root but whose kernel-resolved target is any absolute path, then write through it with a follow-up regular-file entry. The result is arbitrary file create/overwrite outside the store’s working directory under the default AllowPathTraversalOnWrite=false configuration — a canonical tar-slip → RCE primitive.

References

  • github.com/advisories/GHSA-m37j-52j7-pjw7
  • github.com/oras-project/oras-go/commit/adab2f25ea95ef4e6e41f50db9266a6701399422
  • github.com/oras-project/oras-go/releases/tag/v2.6.2
  • github.com/oras-project/oras-go/security/advisories/GHSA-m37j-52j7-pjw7
  • nvd.nist.gov/vuln/detail/CVE-2026-85731

Code Behaviors & Features

Detect and mitigate CVE-2026-85731 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 2.6.2

Fixed versions

  • 2.6.2

Solution

Upgrade to version 2.6.2 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-59: Improper Link Resolution Before File Access ('Link Following')

Source file

go/oras.land/oras-go/v2/CVE-2026-85731.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:09 +0000.