UBUNTU-CVE-2021-29428 (CVE-2021-29428)
Vulnerability from osv_ubuntu – Published: 2021-04-13 20:15 – Updated: 2026-11-24 09:45 – Source websiteIn 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.
| Ecosystem | Package | Version |
|---|---|---|
| Ubuntu:16.04:LTS |
gradle
pkg:deb/ubuntu/gradle@2.10-1?arch=source&distro=xenial
|
Affected: All versions (ecosystem)
2.5-32.7-12.7-22.7-32.10-1
|
| Ubuntu:Pro:18.04:LTS |
gradle
pkg:deb/ubuntu/gradle@4.4.1-5ubuntu2~18.04+esm1?arch=source&distro=esm-apps/bionic
|
Affected: All versions (ecosystem)
3.2.1-3build23.2.1-43.2.1-53.4.1-43.4.1-63.4.1-7ubuntu14.4.1-5ubuntu2~18.044.4.1-5ubuntu2~18.04+esm1
|
| Ubuntu:20.04:LTS |
gradle
pkg:deb/ubuntu/gradle@4.4.1-10?arch=source&distro=focal
|
Affected: All versions (ecosystem)
4.4.1-84.4.1-94.4.1-10
|
| Ubuntu:22.04:LTS |
gradle
pkg:deb/ubuntu/gradle@4.4.1-13?arch=source&distro=jammy
|
Affected: All versions (ecosystem)
4.4.1-13
|
| Ubuntu:24.04:LTS |
gradle
pkg:deb/ubuntu/gradle@4.4.1-20?arch=source&distro=noble
|
Affected: All versions (ecosystem)
4.4.1-184.4.1-20
|
| Ubuntu:25.10 |
gradle
pkg:deb/ubuntu/gradle@4.4.1-22?arch=source&distro=questing
|
Affected: All versions (ecosystem)
4.4.1-22
|
| Ubuntu:26.10 |
gradle
pkg:deb/ubuntu/gradle@4.4.1-23?arch=source&distro=stonking
|
Affected: All versions (ecosystem)
4.4.1-22ubuntu14.4.1-23
|
| Ubuntu:26.04:LTS |
gradle
pkg:deb/ubuntu/gradle@4.4.1-22ubuntu1?arch=source&distro=resolute
|
Affected: All versions (ecosystem)
4.4.1-224.4.1-22build14.4.1-22ubuntu1
|
{
"affected": [
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "gradle",
"binary_version": "2.10-1"
},
{
"binary_name": "libgradle-core-java",
"binary_version": "2.10-1"
},
{
"binary_name": "libgradle-plugins-java",
"binary_version": "2.10-1"
}
]
},
"package": {
"ecosystem": "Ubuntu:16.04:LTS",
"name": "gradle",
"purl": "pkg:deb/ubuntu/gradle@2.10-1?arch=source\u0026distro=xenial"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.5-3",
"2.7-1",
"2.7-2",
"2.7-3",
"2.10-1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "gradle",
"binary_version": "4.4.1-5ubuntu2~18.04+esm1"
},
{
"binary_name": "libgradle-core-java",
"binary_version": "4.4.1-5ubuntu2~18.04+esm1"
},
{
"binary_name": "libgradle-plugins-java",
"binary_version": "4.4.1-5ubuntu2~18.04+esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:18.04:LTS",
"name": "gradle",
"purl": "pkg:deb/ubuntu/gradle@4.4.1-5ubuntu2~18.04+esm1?arch=source\u0026distro=esm-apps/bionic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"3.2.1-3build2",
"3.2.1-4",
"3.2.1-5",
"3.4.1-4",
"3.4.1-6",
"3.4.1-7ubuntu1",
"4.4.1-5ubuntu2~18.04",
"4.4.1-5ubuntu2~18.04+esm1"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "gradle",
"binary_version": "4.4.1-10"
},
{
"binary_name": "libgradle-core-java",
"binary_version": "4.4.1-10"
},
{
"binary_name": "libgradle-plugins-java",
"binary_version": "4.4.1-10"
}
]
},
"package": {
"ecosystem": "Ubuntu:20.04:LTS",
"name": "gradle",
"purl": "pkg:deb/ubuntu/gradle@4.4.1-10?arch=source\u0026distro=focal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"4.4.1-8",
"4.4.1-9",
"4.4.1-10"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "gradle",
"binary_version": "4.4.1-13"
},
{
"binary_name": "libgradle-core-java",
"binary_version": "4.4.1-13"
},
{
"binary_name": "libgradle-plugins-java",
"binary_version": "4.4.1-13"
}
]
},
"package": {
"ecosystem": "Ubuntu:22.04:LTS",
"name": "gradle",
"purl": "pkg:deb/ubuntu/gradle@4.4.1-13?arch=source\u0026distro=jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"4.4.1-13"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "gradle",
"binary_version": "4.4.1-20"
},
{
"binary_name": "libgradle-core-java",
"binary_version": "4.4.1-20"
},
{
"binary_name": "libgradle-plugins-java",
"binary_version": "4.4.1-20"
}
]
},
"package": {
"ecosystem": "Ubuntu:24.04:LTS",
"name": "gradle",
"purl": "pkg:deb/ubuntu/gradle@4.4.1-20?arch=source\u0026distro=noble"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"4.4.1-18",
"4.4.1-20"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "gradle",
"binary_version": "4.4.1-22"
},
{
"binary_name": "libgradle-core-java",
"binary_version": "4.4.1-22"
},
{
"binary_name": "libgradle-plugins-java",
"binary_version": "4.4.1-22"
}
]
},
"package": {
"ecosystem": "Ubuntu:25.10",
"name": "gradle",
"purl": "pkg:deb/ubuntu/gradle@4.4.1-22?arch=source\u0026distro=questing"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"4.4.1-22"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "gradle",
"binary_version": "4.4.1-23"
},
{
"binary_name": "libgradle-core-java",
"binary_version": "4.4.1-23"
},
{
"binary_name": "libgradle-plugins-java",
"binary_version": "4.4.1-23"
}
]
},
"package": {
"ecosystem": "Ubuntu:26.10",
"name": "gradle",
"purl": "pkg:deb/ubuntu/gradle@4.4.1-23?arch=source\u0026distro=stonking"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"4.4.1-22ubuntu1",
"4.4.1-23"
]
},
{
"ecosystem_specific": {
"binaries": [
{
"binary_name": "gradle",
"binary_version": "4.4.1-22ubuntu1"
},
{
"binary_name": "libgradle-core-java",
"binary_version": "4.4.1-22ubuntu1"
},
{
"binary_name": "libgradle-plugins-java",
"binary_version": "4.4.1-22ubuntu1"
}
]
},
"package": {
"ecosystem": "Ubuntu:26.04:LTS",
"name": "gradle",
"purl": "pkg:deb/ubuntu/gradle@4.4.1-22ubuntu1?arch=source\u0026distro=resolute"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"4.4.1-22",
"4.4.1-22build1",
"4.4.1-22ubuntu1"
]
}
],
"aliases": [],
"details": "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.",
"id": "UBUNTU-CVE-2021-29428",
"modified": "2026-11-24T09:45:04Z",
"published": "2021-04-13T20:15:00Z",
"references": [
{
"type": "REPORT",
"url": "https://ubuntu.com/security/CVE-2021-29428"
},
{
"type": "REPORT",
"url": "https://docs.gradle.org/7.0/release-notes.html#security-advisories"
},
{
"type": "REPORT",
"url": "https://github.com/gradle/gradle/pull/15240"
},
{
"type": "REPORT",
"url": "https://github.com/gradle/gradle/pull/15654"
},
{
"type": "REPORT",
"url": "https://github.com/gradle/gradle/security/advisories/GHSA-89qm-pxvm-p336"
},
{
"type": "REPORT",
"url": "https://www.cve.org/CVERecord?id=CVE-2021-29428"
}
],
"related": [],
"schema_version": "1.9.2",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H",
"source": "CNA",
"type": "CVSS_V3"
},
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"source": "NVD",
"type": "CVSS_V3"
},
{
"score": "medium",
"source": "SELF",
"type": "Ubuntu"
}
],
"upstream": [
"CVE-2021-29428"
]
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.