CVE-2021-29428 json
Local privilege escalation through system temporary directory
published 2021-04-13 5 y ago modified 2026-10-08 31 d ago also BIT-gradle-2021-29428 , EUVD-2021-16059 , GHSA-89qm-pxvm-p336
- cvss
- 8.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 45%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- bitnami gradle 7.0.0
- gradle gradle 7.0
- gradle SLES for SAP 15 SP3, SLES for SAP 15 SP2, SLES 15 SP3-LTSS +9 more 4.4.1-150200.3.7.1
suse advisories SUSE-SU-2023:1867-1
- gradle-src Arch Linux 7.0-1
- gradle Arch Linux 7.0-1
arch linux advisories AVG-1809
- github.com/gradle/gradle#15654 pull request
- github.com/gradle/gradle#15240 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-29428 updated cvss 7.8
gradle: local privilege escalation through system temporary directory
-
Red Hat build of Quarkus gradle gradleaffected: no fix available
-
Red Hat Integration Camel K 1 gradle gradleaffected: no fix available “Fix deferred”
-
Red Hat Integration Camel Quarkus 1 gradle gradleaffected: no fix available
-
Red Hat build of Quarkus 2.7.5fixed: vendor fix RHSA-2022:4623
-
Red Hat Fuse 7 gradle gradle Red Hat JBoss Enterprise Application Platform 7 gradle gradle Red Hat JBoss Enterprise Application Platform Expansion Pack gradle gradle Red Hat streams for Apache Kafka gradle gradlenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 31 d ago
Exploit prediction
0.54% chance of exploitation in the next 30 days, higher than 45% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/gradle/gradle/security/advisories/GHSA-89qm-pxvm-p336 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 4.4 | AV:L/AC:M/Au:N/C:P/I:P/A:P |
| OSV | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | gradle | <7.0.0 |
7.0.0 |
Affected products
- gradle gradle
Classification
References
-
github.com
/gradle/gradle/pull/15654
patch, third-party-advisory, advisory
-
github.com
/gradle/gradle/pull/15240
patch, third-party-advisory, advisory
-
github.com
/gradle/gradle/security/advisories/GHSA-89qm-pxvm-p336
exploit, third-party-advisory, advisory
-
docs.gradle.org
/7.0/release-notes.html#security-advisories
release-notes, vendor-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-29428
web
Sources
- CVE List CVE-2021-29428
- NVD CVE-2021-29428
- OSV BIT-gradle-2021-29428
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.