NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Maven

CVE-2026-75598: Gradle Shadow: Zip Slip path traversal in ShadowCopyAction — no independent entry-name sanitization

highCVSS 3.1 8.1GHSA-rr8v-fxxf-c986

Summary ShadowCopyAction in the Shadow plugin does not validate or sanitize ZIP entry names before writing them to the output fat JAR. A malicious upstream dependency containing path traversal sequences (e.g. ../../../../tmp/pwned.txt) in entry names will have those entries reproduced verbatim in the output shadow JAR.

Published Nov 9, 2026

Affected packages

com.gradleup.shadow:com.gradleup.shadow.gradle.plugin

Ecosystem
Maven
Affected
< 9.6.0
Fixed in
9.6.0
Check
mvn dependency:tree -Dincludes=com.gradleup.shadow:com.gradleup.shadow.gradle.plugin

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

Summary

ShadowCopyAction in the Shadow plugin does not validate or sanitize ZIP entry names before writing them to the output fat JAR. A malicious upstream dependency containing path traversal sequences (e.g. ../../../../tmp/pwned.txt) in entry names will have those entries reproduced verbatim in the output shadow JAR.

Details

The vulnerability exists because Shadow relies entirely on Gradle's ZipFileTree for entry sanitization rather than implementing its own path validation. This means:

  1. Users on Gradle < 7.6.2 / 8.x < 8.2.0 are directly exploitable
  2. The produced shadow JAR becomes a Zip Slip weapon against any

downstream consumer using unprotected extraction (raw ZipInputStream, older CI tooling, custom Java unpackers)

  1. If Shadow ever uses a non-ZipFileTree code path, protection

disappears silently

Affected file: src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/internal/ShadowCopyAction.kt

PoC

  1. Create a malicious JAR with path traversal entry:
import zipfile
with zipfile.ZipFile('evil.jar', 'w') as zf:
    zf.writestr('../../../../tmp/zipslip_proof.txt', 'pwned')
  1. Add as dependency in a shadow project
  2. Run gradle shadowJar
  3. Run unzip -l build/libs/*.jar | grep "\.\."
  4. Traversal entry survives in output JAR

Impact

Any tool extracting the shadow JAR with unprotected extraction is subject to arbitrary file overwrite. Users on older Gradle versions are directly vulnerable at build time.

Credited to ikersl.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology