GHSA-xm96-gfjx-jcrc: ORAS Java Path Traversal Vulnerability
HIGHGHSA-xm96-gfjx-jcrc is a HIGH (CVSS 8.1) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting ORAS Java libraries in the Maven ecosystem. The issue involves path traversal in pullartifact via attacker-controlled org.opencontainers.image.title annotation. Remediation is available by upgrading affected packages to version 0.6.2.
GHSA-xm96-gfjx-jcrc at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H).
How to Fix GHSA-xm96-gfjx-jcrc
To remediate this vulnerability, upgrade all affected ORAS Java dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>land.oras</groupId>
<artifactId>oras-java-sdk</artifactId>
<version>0.6.2</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=land.oras
How to Check if You Are Affected
To determine whether your Java application is affected by GHSA-xm96-gfjx-jcrc, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=land.oras
Analyze the terminal output to locate any version of ORAS Java in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.2), your application is affected.
Note: The mvn dependency:tree -Dincludes=land.oras command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In ORAS Java, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-xm96-gfjx-jcrc Affected ORAS Java Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
land.oras:oras-java-sdk
|
Maven |
< 0.6.2
|
0.6.2
|
References
Frequently Asked Questions
What is GHSA-xm96-gfjx-jcrc?
Which ORAS Java versions are affected?
What version fixes GHSA-xm96-gfjx-jcrc?
Is oras-java-sdk affected?
What is the CVSS score of GHSA-xm96-gfjx-jcrc?
What CWE is associated with GHSA-xm96-gfjx-jcrc?
How can I check Maven dependencies for GHSA-xm96-gfjx-jcrc?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xm96-gfjx-jcrc",
"modified" : "2026-05-19T15:47:36Z",
"published" : "2026-05-19T15:47:36Z",
"aliases" : [ ],
"summary" : "ORAS Java: Path traversal in pullArtifact via attacker-controlled org.opencontainers.image.title annotation",
"details" : "### Summary\n\nThe `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.\n\n### Details\n\nTwo call sites are affected.\n\n`src/main/java/land/oras/Registry.java`, `pullLayer` (reached from `Registry.pullArtifact`):\n\n```java\nPath targetPath = path.resolve(layer.getAnnotations().get(Const.ANNOTATION_TITLE));\n...\nFiles.copy(is, targetPath, StandardCopyOption.REPLACE_EXISTING);\n```\n\n`src/main/java/land/oras/OCILayout.java`, `OCILayout.pullArtifact`:\n\n```java\nFiles.copy(blobPath, path.resolve(layer.getAnnotations().get(Const.ANNOTATION_TITLE)));\n```\n\nThe 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.\n\nThe 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.\n\n`fetchBlob(ContainerRef, Path)` is not affected. The caller passes the destination path and the title annotation is not consulted.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "land.oras:oras-java-sdk"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.6.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.6.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/oras-project/oras-java/security/advisories/GHSA-xm96-gfjx-jcrc"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/oras-project/oras-java"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-19T15:47:36Z",
"nvd_published_at" : null
}
}