GHSA-RR8V-FXXF-C986
Gradle Shadow: Zip Slip path traversal in ShadowCopyAction — no independent entry-name sanitization
Texto original en inglés · Ver en español
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 9.6.0 | com.gradleup.shadow:com.gradleup.shadow.gradle.plugin · -116 d desde divulgación | |
| Divulgación | Publicada | GHSA-RR8V-FXXF-C986 divulgada | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice |
### 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:
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.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
mavencom.gradleup.shadow:com.gradleup.shadow.gradle.plugin |
Corregida | 9.6.0 | -116 d | 9.6.1 no afectada |
9.6.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://nvd.nist.gov/vuln/detail/CVE-2026-75598https://github.com/GradleUp/shadow/security/advisories/GHSA-rr8v-fxxf-c986https://github.com/GradleUp/shadow/commit/0c2744fcc050e34a084f5131d5e167b13c342bfdhttps://github.com/GradleUp/shadowhttps://github.com/GradleUp/shadow/releases/tag/9.6.0Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
