{"answers":{"affected":"2 open source packages ship an affected version, including land.oras:oras-java-sdk.","exploited":"There is no known exploitation of GHSA-xm96-gfjx-jcrc in the wild and no public exploit code.","fix":"Upgrade land.oras:oras-java-sdk to 0.6.2 or later.","what":"GHSA-xm96-gfjx-jcrc is a path traversal vulnerability in land.oras:oras-java-sdk, published on 19 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-xm96-gfjx-jcrc and fix it if it is affected.\n\nWhat it is: GHSA-xm96-gfjx-jcrc is a path traversal vulnerability in land.oras:oras-java-sdk, published on 19 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-xm96-gfjx-jcrc in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- land.oras:oras-java-sdk (Maven): affected all versions; fixed in 0.6.2\n- land.oras:oras-java-sdk (Maven): affected all versions; fixed in 0.6.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-xm96-gfjx-jcrc/ (Markdown: https://insights.sbomify.com/GHSA-xm96-gfjx-jcrc/index.md)","id":"GHSA-xm96-gfjx-jcrc","markdown":"https://insights.sbomify.com/GHSA-xm96-gfjx-jcrc/index.md","name":"GHSA-xm96-gfjx-jcrc","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Java OCI registry library","requires_auth":"none","summary":"Attackers can write arbitrary files outside the intended directory by manipulating OCI manifest annotations during artifact pulls in the ORAS Java library.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### 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.","ecosystems":["Maven"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"ORAS Java: Path traversal in pullArtifact via attacker-controlled org.opencontainers.image.title annotation","id":"GHSA-xm96-gfjx-jcrc","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Maven","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Maven","fixed":["0.6.2"],"introduced":["0"],"last_affected":[],"package":"land.oras:oras-java-sdk","purl":null,"source":"GHSA-xm96-gfjx-jcrc"},{"ecosystem":"Maven","fixed":["0.6.2"],"introduced":["0"],"last_affected":[],"package":"land.oras:oras-java-sdk","purl":"pkg:maven/land.oras/oras-java-sdk","source":"GHSA-xm96-gfjx-jcrc"}],"products":null,"published":"2026-05-19","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can write arbitrary files outside the intended directory by manipulating OCI manifest annotations during artifact pulls in the ORAS Java library.","url":"https://insights.sbomify.com/GHSA-xm96-gfjx-jcrc/"}