Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
☕
☕ Maven
Not in CISA KEV
HIGH severity

GHSA-xm96-gfjx-jcrc — oras-java-sdk

HIGH

GHSA-xm96-gfjx-jcrc is a high-severity (CVSS 8.1) vulnerability in land.oras:oras-java-sdk. A fix is available for land.oras:oras-java-sdk — see the affected versions and patch details below.

ORAS Java: Path traversal in pullArtifact via attacker-controlled org.opencontainers.image.title annotation

Published
May 19, 2026
Updated
May 19, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of May 19, 2026 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected
☕land.oras:oras-java-sdk

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.

Description

Summary

The pullArtifact methods in Registry and OCILayout use the org.opencontainers.image.title annotation from a pulled manifest as a filename, resolving it against the caller supplied output directory without normalization or a containment check. A manifest publisher can set this annotation to a path that escapes the output directory, causing the SDK to write the layer's blob anywhere the JVM process can write.

Details

Two call sites are affected.

src/main/java/land/oras/Registry.java, pullLayer (reached from Registry.pullArtifact):

Path targetPath = path.resolve(layer.getAnnotations().get(Const.ANNOTATION_TITLE));
...
Files.copy(is, targetPath, StandardCopyOption.REPLACE_EXISTING);

src/main/java/land/oras/OCILayout.java, OCILayout.pullArtifact:

Files.copy(blobPath, path.resolve(layer.getAnnotations().get(Const.ANNOTATION_TITLE)));

The annotation comes from the remote manifest. Path.resolve treats an absolute argument as a full override of the base, and follows .. segments upward, so the annotation controls the destination. REPLACE_EXISTING overwrites files that exist at that destination.

The unpack branch of pullLayer (taken when the layer carries io.deis.oras.content.unpack=true) is not affected, because it dispatches through ArchiveUtils.untar / unzip, which apply outputPath.startsWith(normalizedTarget) after normalization. The non unpack branch and OCILayout.pullArtifact lack the equivalent check.

fetchBlob(ContainerRef, Path) is not affected. The caller passes the destination path and the title annotation is not consulted.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
☕Mavenland.oras:oras-java-sdkall versions0.6.2land.oras:oras-java-sdk:0.6.2

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for land.oras:oras-java-sdk, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update land.oras:oras-java-sdk to 0.6.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-xm96-gfjx-jcrc is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

### Summary The `pullArtifact` methods in `Registry` and `OCILayout` use the `org.opencontainers.image.title` annotation from a pulled manifest as a filename, resolving it against the caller supplied output directory without normalization or a containment check. A manifest publisher can set this annotation to a path that escapes the output directory, causing the SDK to write the layer's blob anywhere the JVM process can write. ### Details Two call sites are affected. `src/main/java/land/oras/Registry.java`, `pullLayer` (reached from `Registry.pullArtifact`): ```java Path targetPath = path
O3 Security · Impact-Aware SCA

Is GHSA-xm96-gfjx-jcrc in your dependencies?

Find it across Maven, including transitive dependencies.

GHSA-xm96-gfjx-jcrc: oras-java-sdk (High 8.1) | O3 Security