6.3medium
Gradle Shadow: Zip Slip path traversal in ShadowCopyAction — no independent entry-name sanitization
- Severity
- 6.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.18% (higher than 5% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-rr8v-fxxf-c986
Description
The Gradle Shadow plugin creates fat or uber JARs and supports file transformation and package relocation. Prior to version 9.6.0, Shadow does not independently validate ZIP entry names before writing them to its output archive. A malicious dependency can cause traversal entry names to be preserved when the applicable archive-processing path does not reject them. Some affected Shadow implementations process dependency archives directly, so upgrading Gradle alone does not universally prevent this behavior. If the resulting archive is extracted without path traversal protection, attacker-controlled files can be written outside the intended destination. This issue is fixed in version 9.6.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| GradleUp shadow | < 9.6.0 | CVE List |
| com.gradleup.shadow:com.gradleup.shadow.gradle.plugin (Maven) | before 9.6.0 | GitHub Advisory Database |
All scores
| GitHub_M | 6.3medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N |
| GitHub | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
The Gradle Shadow plugin creates fat or uber JARs and supports file transformation and package relocation. Prior to version 9.6.0, Shadow does not independently validate ZIP entry names before writing them to its output archive. A malicious dependency can cause traversal entry names to be preserved when the applicable archive-processing path does not reject them. Some affected Shadow implementations process dependency archives directly, so upgrading Gradle alone does not universally prevent this behavior. If the resulting archive is extracted without path traversal protection, attacker-controlled files can be written outside the intended destination. This issue is fixed in version 9.6.0.
GitHub Advisory Database
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:
- Users on Gradle < 7.6.2 / 8.x < 8.2.0 are directly exploitable
- The produced shadow JAR becomes a Zip Slip weapon against any downstream consumer using unprotected extraction (raw ZipInputStream, older CI tooling, custom Java unpackers)
- 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
- 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')
- Add as dependency in a shadow project
- Run
gradle shadowJar - Run
unzip -l build/libs/*.jar | grep "\.\." - 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.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-75598 changed 2026-11-09 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-rr8v-fxxf-c986 changed 2026-11-09 | CC-BY-4.0 |
| NVD | CVE-2026-75598 changed 2026-11-12 | Public domain |