CVE-2021-32751: Gradle is a build tool with a focus on build automation
CVE-2021-32751 is a high-severity flaw (CVSS 7.5) affecting gradle. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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
Why this priority
- High severity
- Public exploit reference
A fixed release or distro patch exists.
Risk facts
| CVSS score | 7.5 (High) |
| Attack vector | Network (remote) |
| Attack complexity | High |
| Privileges needed | Low |
| User interaction | None |
| EPSS exploit chance | 2.7% (top 14%) |
| CISA exploited list | No |
| Weakness | CWE-78 |
| Published | 2021-07-20 |
| Last modified | 2026-10-08 |
Last updated 2026-10-08 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2021-32751?
gradle: upgrade to 7.2. Exact commands for each OS are on this page.
Is CVE-2021-32751 being exploited?
CVE-2021-32751 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2021-32751 affect?
CVE-2021-32751 affects gradle. Severity is high (CVSS 7.5). 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 chan
How urgent is CVE-2021-32751?
Priority 53/100. High severity; Public exploit reference
Related CVEs
- CVE-2023-44387 LOW 3.2 UPGRADE Gradle is a build tool with a focus on build automation and support for multi-language development
- CVE-2021-29429 MEDIUM 4.0 UPGRADE UPGRADE In Gradle before version 7.0, files created with open permissions in the system temporary directory can allow
- CVE-2021-29428 HIGH 8.8 UPGRADE UPGRADE In Gradle before version 7.0, on Unix-like systems, the system temporary directory can be created with open pe
- CVE-2020-11979 HIGH 7.5 DOWNGRADE UPGRADE As mitigation for CVE-2020-1945 Apache Ant 1.10.8 changed the permissions of temporary files it created so tha
- CVE-2026-22865 HIGH 7.4 UPGRADE Gradle is a build automation tool, and its native-platform tool provides Java bindings for native APIs