GHSA-xm96-gfjx-jcrc
### 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.resolve(layer.getAnnotations().get(Const.ANNOTATION_TITLE)); ... Files.copy(is, targetPath, StandardCopyOption.REPLACE_EXISTING); ``` `src/main/java/land/oras/OCILayout.java`, `OCILayout.pullArtifact`: ```java 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.
Properties
- ghsa_id
- GHSA-xm96-gfjx-jcrc
- summary
- ORAS Java: Path traversal in pullArtifact via attacker-controlled org.opencontainers.image.title annotation
- severity
- high
- cvss_score
- 8.1
- cve_id
- GHSA-xm96-gfjx-jcrc
- cvss_vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
- is_ghsa_only
- true
- ghsa_published
- 2026-05-19T15:47:36Z
- source_url
- https://github.com/advisories/GHSA-xm96-gfjx-jcrc
- ghsa_updated
- 2026-05-19T15:47:37Z
Related Entities (4)
REPORTED_BY (1)
VULNERABLE_TO (1)
AFFECTS (1)
HAS_WEAKNESS (1)
Explore deeper with Ninja Signal's threat intelligence graph