{"id":"CVE-2021-29428","aliases":["BIT-gradle-2021-29428","DEBIAN-CVE-2021-29428","EUVD-2021-16059","GHSA-89qm-pxvm-p336","SUSE-SU-2023:1867-1","UBUNTU-CVE-2021-29428"],"status":"published","title":"Local privilege escalation through system temporary directory","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.","severity":{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00542,"percentile":0.45818,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-378","CWE-379"],"published":"2021-04-13T17:55:18Z","modified":"2026-10-24T10:50:07Z","fixes":[{"ecosystem":"Bitnami","package":"gradle","fixed_in":["7.0.0"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Module for Development Tools 15 SP4","package":"gradle","fixed_in":["4.4.1-150200.3.7.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS","package":"gradle","fixed_in":["4.4.1-150200.3.7.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS","package":"gradle","fixed_in":["4.4.1-150200.3.7.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS","package":"gradle","fixed_in":["4.4.1-150200.3.7.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Real Time 15 SP3","package":"gradle","fixed_in":["4.4.1-150200.3.7.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP2-LTSS","package":"gradle","fixed_in":["4.4.1-150200.3.7.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP3-LTSS","package":"gradle","fixed_in":["4.4.1-150200.3.7.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP2","package":"gradle","fixed_in":["4.4.1-150200.3.7.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP3","package":"gradle","fixed_in":["4.4.1-150200.3.7.1"],"sources":["osv"]},{"ecosystem":"SUSE:Enterprise Storage 7","package":"gradle","fixed_in":["4.4.1-150200.3.7.1"],"sources":["osv"]},{"ecosystem":"SUSE:Enterprise Storage 7.1","package":"gradle","fixed_in":["4.4.1-150200.3.7.1"],"sources":["osv"]},{"ecosystem":"openSUSE:Leap 15.4","package":"gradle","fixed_in":["4.4.1-150200.3.7.1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Bitnami","package":"gradle","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"7.0.0"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.4.1-18","4.4.1-19","4.4.1-20","4.4.1-21","4.4.1-22","4.4.1-23","4.5.1-1","4.6-1","4.6-2","4.6-3"]},{"source":"osv","ecosystem":"Debian:13","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.4.1-22","4.4.1-23","4.5.1-1","4.6-1","4.6-2","4.6-3"]},{"source":"osv","ecosystem":"Debian:14","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.4.1-22","4.4.1-23","4.5.1-1","4.6-1","4.6-2","4.6-3"]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Module for Development Tools 15 SP4","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.4.1-150200.3.7.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.4.1-150200.3.7.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.4.1-150200.3.7.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.4.1-150200.3.7.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Real Time 15 SP3","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.4.1-150200.3.7.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server 15 SP2-LTSS","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.4.1-150200.3.7.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server 15 SP3-LTSS","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.4.1-150200.3.7.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP2","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.4.1-150200.3.7.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP3","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.4.1-150200.3.7.1"}]}]},{"source":"osv","ecosystem":"SUSE:Enterprise Storage 7","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.4.1-150200.3.7.1"}]}]},{"source":"osv","ecosystem":"SUSE:Enterprise Storage 7.1","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.4.1-150200.3.7.1"}]}]},{"source":"osv","ecosystem":"openSUSE:Leap 15.4","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.4.1-150200.3.7.1"}]}]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5-3","2.7-1","2.7-2","2.7-3","2.10-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"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"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.4.1-8","4.4.1-9","4.4.1-10"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.4.1-13"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.4.1-18","4.4.1-20"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.4.1-22"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.4.1-22ubuntu1","4.4.1-23"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"gradle","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["4.4.1-22","4.4.1-22build1","4.4.1-22ubuntu1"]}],"products":[{"vendor":"gradle","product":"gradle"},{"vendor":"quarkus","product":"quarkus"}],"references":[{"url":"https://docs.gradle.org/7.0/release-notes.html#security-advisories","tags":["x_refsource_MISC","x_transferred","Release Notes","Vendor Advisory","advisory","report"]},{"url":"https://github.com/gradle/gradle/security/advisories/GHSA-89qm-pxvm-p336","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Third Party Advisory","advisory","evidence","report"]},{"url":"https://github.com/gradle/gradle/pull/15654","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","advisory","fix","report"]},{"url":"https://github.com/gradle/gradle/pull/15240","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","advisory","fix","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29428","tags":["web"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-29428","tags":["advisory"]},{"url":"https://www.suse.com/support/update/announcement/2023/suse-su-20231867-1/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/1184807","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2021-29428","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2021-29428","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-29428","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-29428","title":"Local privilege escalation through system temporary directory","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.","status":"published","published":"2021-04-13T17:55:18Z","modified":"2026-10-08T21:24:19.23Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-379","CWE-378"],"updated_at":"2026-11-02T14:33:06.658806Z"}],"euvd":[{"id":"EUVD-2021-16059","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.","status":"published","published":"2021-04-13T17:55:18Z","modified":"2026-10-08T21:24:19Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T17:27:25.942984Z"}],"nvd":[{"id":"CVE-2021-29428","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.","status":"published","published":"2021-04-13T20:15:21.797Z","modified":"2026-10-08T22:17:08.813Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":4.4,"vector":"AV:L/AC:M/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-378","CWE-379"],"updated_at":"2026-11-02T14:06:51.610648Z"}],"osv":[{"id":"CVE-2021-29428","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.","status":"published","published":"2021-04-13T20:15:21.797Z","modified":"2026-10-24T10:50:07.721651867Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:19.129331Z"},{"id":"DEBIAN-CVE-2021-29428","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.","status":"published","published":"2021-04-13T20:15:21.797Z","modified":"2026-10-09T10:01:05.235188564Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:34.94143Z"},{"id":"UBUNTU-CVE-2021-29428","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.","status":"published","published":"2021-04-13T20:15:00Z","modified":"2026-10-17T12:57:12.657733272Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:54:26.779273Z"},{"id":"BIT-gradle-2021-29428","title":"Local privilege escalation through system temporary directory","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.","status":"published","published":"2024-03-06T10:54:54.311Z","modified":"2026-09-08T08:47:50.368162811Z","updated_at":"2026-11-02T15:28:31.02759Z"},{"id":"SUSE-SU-2023:1867-1","title":"Security update for gradle","description":"This update for gradle fixes the following issues:\n\n- CVE-2021-29428: Fixed a local privilege escalation through system temporary directory. (bsc#1184807)\n","status":"published","published":"2023-04-17T12:14:43Z","modified":"2026-02-04T03:21:48.065548Z","updated_at":"2026-11-02T15:53:52.350754Z"}]}}
