HIGH · CVSS 3.1 8.1 EPSS 0.2% · 5th percentile CWE-22

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

Published 2026-11-09 · Updated 2026-11-09 · Also known as GHSA-rr8v-fxxf-c986

Summary

The Gradle Shadow plugin's ShadowCopyAction does not sanitize ZIP entry names, allowing path traversal (Zip Slip) entries to be written into the shadow JAR. Projects using Shadow versions before 9.6.0 are vulnerable to arbitrary file overwrite when the resulting JAR is extracted by downstream tools.

Who is affected

If a dependency contains a ZIP entry with path traversal sequences (e.g., `../../../../tmp/pwned.txt`), the Shadow plugin will copy that entry unchanged into the generated fat JAR. Downstream consumers that extract the JAR without proper ZIP safety (e.g., raw ZipInputStream or older CI tooling) can be forced to overwrite arbitrary files on the filesystem. The vulnerability is present for all Shadow plugin versions from the initial release up to, but not including, version 9.6.0. Users on Gradle versions older than 7.6.2 (Gradle 7) or 8.x before 8.2.0 also lack additional protection.

Exploitability

The CVSS vector indicates a remotely exploitable flaw with low attack complexity, no required privileges, and user interaction, resulting in high impact to integrity and availability but no confidentiality loss. The EPSS score of 0.001 (0.035 percentile) reflects a very low probability of exploitation in the wild. Since the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog, there is no confirmation of active exploitation.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
Maven com.gradleup.shadow:com.gradleup.shadow.gradle.plugin >= 0, < 9.6.0 9.6.0 -

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H

Attack vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionRequired
ScopeUnchanged
ConfidentialityNone
IntegrityHigh
AvailabilityHigh

FAQ

What is Zip Slip?

Zip Slip is a path traversal vulnerability in ZIP archives where entries containing sequences like `../` can cause files to be written outside the intended extraction directory.

How can I confirm if my Shadow JAR contains unsafe entries?

Run a command such as `unzip -l build/libs/*.jar` and look for entries that contain `..` sequences; their presence indicates a potential Zip Slip vulnerability.

Why does upgrading to Shadow 9.6.0 fix the issue?

Version 9.6.0 introduces independent entry-name sanitization in ShadowCopyAction, which validates and blocks traversal sequences before writing entries to the output JAR.

Original advisory description
### 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) 3. 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: ```python import zipfile with zipfile.ZipFile('evil.jar', 'w') as zf: zf.writestr('../../../../tmp/zipslip_proof.txt', 'pwned') ``` 2. Add as dependency in a shadow project 3. Run `gradle shadowJar` 4. Run `unzip -l build/libs/*.jar | grep "\.\."` 5. 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

Source records: GHSA-rr8v-fxxf-c986 (OSV.dev) · EPSS by FIRST, 2026-11-26.