GHSA-rr8v-fxxf-c986

Suggest an improvement
Source
https://github.com/advisories/GHSA-rr8v-fxxf-c986
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-rr8v-fxxf-c986/GHSA-rr8v-fxxf-c986.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-rr8v-fxxf-c986
Aliases
Published
2026-11-09T21:48:13Z
Modified
2026-11-09T22:00:07Z
Severity
  • 8.1 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H CVSS Calculator
Summary
Gradle Shadow: Zip Slip path traversal in ShadowCopyAction — no independent entry-name sanitization
Details

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')
  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.

Database specific
{
    "cwe_ids": [
        "CWE-22"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-11-09T21:48:13Z",
    "nvd_published_at": "2026-11-06T18:18:18Z",
    "severity": "HIGH"
}
References

Affected packages

Maven / com.gradleup.shadow:com.gradleup.shadow.gradle.plugin

Package

Name
com.gradleup.shadow:com.gradleup.shadow.gradle.plugin
View open source insights on deps.dev
Purl
pkg:maven/com.gradleup.shadow/com.gradleup.shadow.gradle.plugin

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
9.6.0

Affected versions

8.*
8.3.0
8.3.1
8.3.2
8.3.3
8.3.4
8.3.5
8.3.6
8.3.7
8.3.8
8.3.9
8.3.10
8.3.11
9.*
9.0.0-beta1
9.0.0-beta2
9.0.0-beta3
9.0.0-beta4
9.0.0-beta5
9.0.0-beta6
9.0.0-beta7
9.0.0-beta8
9.0.0-beta9
9.0.0-beta10
9.0.0-beta11
9.0.0-beta12
9.0.0-beta13
9.0.0-beta14
9.0.0-beta15
9.0.0-beta16
9.0.0-beta17
9.0.0-rc1
9.0.0-rc2
9.0.0-rc3
9.0.0
9.0.1
9.0.2
9.1.0
9.2.0
9.2.1
9.2.2
9.3.0
9.3.1
9.3.2
9.4.0
9.4.1
9.4.2
9.4.3
9.5.0
9.5.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-rr8v-fxxf-c986/GHSA-rr8v-fxxf-c986.json"