
CVE catalog
CVE-2021-32751
gradle: CVE-2021-32751
- Severity
- High · CVSS 7.5
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 2.71% · Oct 25, 2026
Gradle is a build tool with a focus on build automation. In versions prior to 7.2, start scripts generated by the `application` plugin and the `gradlew` script are both vulnerable to arbitrary code execution when an attacker is able to change environment variables for the user running the script. This may impact those who use `gradlew` on Unix-like systems or use the scripts generated by Gradle in thieir application on Unix-like systems. For this vulnerability to be exploitable, an attacker needs to be able to set the value of particular environment variables and have those environment variables be seen by the vulnerable scripts. This issue has been patched in Gradle 7.2 by removing the use of `eval` and requiring the use of the `bash` shell. There are a few workarounds available. For CI/CD systems using the Gradle build tool, one may ensure that untrusted users are unable to change environment variables for the user that executes `gradlew`. If one is unable to upgrade to Gradle 7.2, one may generate a new `gradlew` script with Gradle 7.2 and use it for older versions of Gradle. Fpplications using start scripts generated by Gradle, one may ensure that untrusted users are unable to change environment variables for the user that executes the start script. A vulnerable start script could be manually patched to remove the use of `eval` or the use of environment variables that affect the application's command-line. If the application is simple enough, one may be able to avoid the use of the start scripts by running the application directly with Java command.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | gradle | sid | 4.7-1 | vulnerable |
| Debian | gradle | forky | 4.6-3 | vulnerable |
| Debian | gradle | trixie | 4.4.1-22 | vulnerable |
| Debian | gradle | bookworm | 4.4.1-18 | vulnerable |
| Cpe | gradle | Not reported | 7.2 | fixed |
| Suse | gradle | linux enterprise module for development tools 15 sp4 | 4.4.1-150200.3.10.1 | fixed |
| Suse | gradle | linux enterprise real time 15 sp3 | 4.4.1-150200.3.10.1 | fixed |
| Opensuse | gradle | leap 15.4 | 4.4.1-150200.3.10.1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | gradle | source | sid | (unfixed) | not yet assigned | Not reported | [1014778] |
| Debian | gradle | source | forky | (unfixed) | not yet assigned | Not reported | [1014778] |
| Debian | gradle | source | trixie | (unfixed) | not yet assigned | Not reported | [1014778] |
| Debian | gradle | source | bookworm | (unfixed) | not yet assigned | Not reported | [1014778] |
| Cpe | gradle | cpe | Not reported | 7.2 | Not reported | NVD-CVE-2021-32751 | Not reported |
| Suse | gradle | rpm | linux enterprise module for development tools 15 sp4 | 4.4.1-150200.3.10.1 | Not reported | SUSE-SU-2023:2203-1 | Not reported |
| Suse | gradle | rpm | linux enterprise real time 15 sp3 | 4.4.1-150200.3.10.1 | Not reported | SUSE-SU-2023:2203-1 | Not reported |
| Opensuse | gradle | rpm | leap 15.4 | 4.4.1-150200.3.10.1 | Not reported | SUSE-SU-2023:2203-1 | Not reported |
Notes
[trixie] gradle: Minor issue [bookworm] gradle: Minor issue
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [gradle]Affected
Details (2)
4.4.1-18· all · bookwormAffected
dsa · gradle · debian · bookworm; dsa · gradle · debian · 12
4.4.1-18· all · bookwormAffected
dsa · gradle · debian · bookworm; dsa · gradle · debian · 12
- [gradle-doc]Affected
Source package: [gradle]
Details (2)
4.4.1-18· all · bookwormAffected
dsa · gradle · debian · bookworm; dsa · gradle · debian · 12
4.4.1-18· all · bookwormAffected
dsa · gradle · debian · bookworm; dsa · gradle · debian · 12
- [libgradle-core-java]Affected
Source package: [gradle]
Details (2)
4.4.1-18· all · bookwormAffected
dsa · gradle · debian · bookworm; dsa · gradle · debian · 12
4.4.1-18· all · bookwormAffected
dsa · gradle · debian · bookworm; dsa · gradle · debian · 12
- [libgradle-plugins-java]Affected
Source package: [gradle]
Details (2)
4.4.1-18· all · bookwormAffected
dsa · gradle · debian · bookworm; dsa · gradle · debian · 12
4.4.1-18· all · bookwormAffected
dsa · gradle · debian · bookworm; dsa · gradle · debian · 12
[Debian 13 (Trixie)]
- [gradle]Affected
Details (2)
4.4.1-22· all · trixieAffected
dsa · gradle · debian · 13
4.4.1-22· all · trixieAffected
dsa · gradle · debian · 13
- [gradle-doc]Affected
Source package: [gradle]
Details (2)
4.4.1-22· all · trixieAffected
dsa · gradle · debian · 13
4.4.1-22· all · trixieAffected
dsa · gradle · debian · 13
- [libgradle-core-java]Affected
Source package: [gradle]
Details (2)
4.4.1-22· all · trixieAffected
dsa · gradle · debian · 13
4.4.1-22· all · trixieAffected
dsa · gradle · debian · 13
- [libgradle-plugins-java]Affected
Source package: [gradle]
Details (2)
4.4.1-22· all · trixieAffected
dsa · gradle · debian · 13
4.4.1-22· all · trixieAffected
dsa · gradle · debian · 13
Observed:
References
- [https://ftp.suse.com/pub/projects/security/csaf/suse-su-2023_2203-1.json]
- [https://nvd.nist.gov/vuln/detail/CVE-2021-32751]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2021-32751]
- [https://osv.dev/vulnerability/SUSE-SU-2023:2203-1]
- [https://security-tracker.debian.org/tracker/CVE-2021-32751]
- [https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-32751.json]
[Debian Security Tracker] · [FIRST EPSS] · [National Vulnerability Database (NVD)] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX] · [SUSE security advisories and VEX]