Advisory Database
  • Advisories
  • Dependency Scanning
  1. maven
  2. ›
  3. land.oras/oras-java-sdk
  4. ›
  5. GHSA-j6hm-v3x2-qv6j

GHSA-j6hm-v3x2-qv6j: land.oras:oras-java-sdk: Symlink-based path traversal in ArchiveUtils.untar / unzip allows arbitrary file write outside extraction directory

July 1, 2026

ArchiveUtils.untar(InputStream, Path) and ArchiveUtils.unzip(InputStream, Path) in land.oras:oras-java-sdk create symbolic-link entries from an archive without validating the symlink target. A malicious tar (or zip) shipped as an OCI layer blob can place a symlink under the extraction directory whose target points outside that directory, then ship a regular-file entry whose path traverses through that symlink. The subsequent Files.newOutputStream call follows the symlink and writes the file outside the caller’s chosen target directory.

This bypasses the existing ensureSafeEntry containment check, which only validates entry.getName() and not entry.getLinkName(). Reachable from the public Registry.pullArtifact / OCILayout.pullArtifact API whenever the manifest layer carries io.deis.oras.content.unpack=true, and from any direct caller of ArchiveUtils.untar / ArchiveUtils.uncompressuntar (e.g. consumers that pull an archive blob and extract it themselves, such as project-scaffolding CLIs that fetch templates from OCI registries).

References

  • github.com/advisories/GHSA-j6hm-v3x2-qv6j
  • github.com/oras-project/oras-java/security/advisories/GHSA-j6hm-v3x2-qv6j

Code Behaviors & Features

Detect and mitigate GHSA-j6hm-v3x2-qv6j with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.6.4

Fixed versions

  • 0.6.4

Solution

Upgrade to version 0.6.4 or above.

Impact

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

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

maven/land.oras/oras-java-sdk/GHSA-j6hm-v3x2-qv6j.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Mon, 13 Jul 2026 00:19:56 +0000.