CVEfocus › CVE database › CVE-2021-29428

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

CVSS 8.8 HighEPSS 0.5% (higher than 39% of CVEs)Published 2021-04-13Updated 2026-10-08Assigner: GitHub_M

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.

CWE-378CWE-379

What to do

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

8Fix pending
4Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10gradleFix pendingUBUNTU-CVE-2021-29428
Ubuntu 26.04gradleFix pendingUBUNTU-CVE-2021-29428
Ubuntu 25.10gradleWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2021-29428
Ubuntu 24.04gradleFix pendingUBUNTU-CVE-2021-29428
Ubuntu 22.04gradleFix pendingUBUNTU-CVE-2021-29428
Ubuntu 20.04gradleWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2021-29428
Ubuntu 18.04gradleFix pendingUBUNTU-CVE-2021-29428
Ubuntu 16.04gradleWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2021-29428
Ubuntu 14.04gradleWill not fix
Ubuntu decided not to fix this in this release
Debian 14gradleFix pendingDEBIAN-CVE-2021-29428
Debian 13gradleFix pendingDEBIAN-CVE-2021-29428
Debian 12gradleFix pendingDEBIAN-CVE-2021-29428

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.