# CVE-2021-29428: Local privilege escalation through system temporary directory

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.54%, higher than 47% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-04-13T17:55:18.000Z
- Modified: 2026-10-08T22:17:08.813Z
- Also known as: BIT-GRADLE-2021-29428, GHSA-89qm-pxvm-p336
- Weaknesses: CWE-378, CWE-379
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

In Gradle before version 7.0, on Unix-like systems, the system temporary directory can be created with open permissions that allow multiple users to create and delete files within it. Gradle builds could be vulnerable to a local privilege escalation from an attacker quickly deleting and recreating files in the system temporary directory. This vulnerability impacted builds using precompiled script plugins written in Kotlin DSL and tests for Gradle plugins written using ProjectBuilder or TestKit. If you are on Windows or modern versions of macOS, you are not vulnerable. If you are on a Unix-like operating system with the "sticky" bit set on your system temporary directory, you are not vulnerable. The problem has been patched and released with Gradle 7.0. As a workaround, on Unix-like operating systems, ensure that the "sticky" bit is set. This only allows the original user (or root) to delete a file. If you are unable to change the permissions of the system temporary directory, you can move the Java temporary directory by setting the System Property `java.io.tmpdir`. The new path needs to limit permissions to the build user only. For additional details refer to the referenced GitHub Security Advisory.

(As written by CVE List.)

## Affected

- gradle gradle: < 7.0; before 7.0
- quarkus quarkus: up to 2.2.3
- gradle (Bitnami): before 7.0.0

## Every score

- GitHub_M: CVSS:3.1 8.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 4.4 Medium `AV:L/AC:M/Au:N/C:P/I:P/A:P`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/gradle/gradle/security/advisories/GHSA-89qm-pxvm-p336> (exploit, advisory, third-party-advisory)
- <https://docs.gradle.org/7.0/release-notes.html#security-advisories> (advisory, release-notes, vendor-advisory)
- <https://github.com/gradle/gradle/pull/15654> (advisory, patch, third-party-advisory)
- <https://github.com/gradle/gradle/pull/15240> (advisory, patch, third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-29428> (web)

## Sources

- CVE List: [CVE-2021-29428](https://www.cve.org/CVERecord?id=CVE-2021-29428), CVE Terms of Use, modified 2026-10-08
- NVD: [CVE-2021-29428](https://nvd.nist.gov/vuln/detail/CVE-2021-29428), Public domain, modified 2026-10-08
- Bitnami Vulnerability Database: [BIT-GRADLE-2021-29428](https://osv.dev/vulnerability/BIT-GRADLE-2021-29428), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-29428 · Whole record: https://cve.day/CVE-2021-29428.json · Rebuilt by cve.day 2026-11-25T22:58:00.799Z
