PT-2021-18204

CVE-2021-29428

·

Published

2021-04-13

·

Updated

2026-10-08

Description by

CVSS 3.1
8.8
High
MetricsAV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions: Gradle versions prior to 7.0
Description: The issue affects Gradle builds on Unix-like systems, where the system temporary directory can be created with open permissions, allowing multiple users to create and delete files within it. This can lead to a local privilege escalation from an attacker quickly deleting and recreating files in the system temporary directory. The vulnerability impacts builds using precompiled script plugins written in Kotlin DSL and tests for Gradle plugins written using ProjectBuilder or TestKit. Users on Windows or modern versions of macOS are not affected. Additionally, users on Unix-like operating systems with the "sticky" bit set on their system temporary directory are also not vulnerable.
Recommendations: For Gradle versions prior to 7.0, ensure that the "sticky" bit is set on the system temporary directory to prevent exploitation. As an alternative, move the Java temporary directory by setting the System Property java.io.tmpdir to a new path that limits permissions to the build user only. Update to Gradle version 7.0 or later, which includes the patch for this issue.
Exploitability
Exploit
Fix
Impacts
Researchers
Vendors
Affected products
Related identifiers
GHSA-89QM-PXVM-P336
BIT-GRADLE-2021-29428
SUSE-SU-2023:1867-1
SUSE-SU-2023_1867-1
Found an issue in the description? Have something to add? Feel free to write us 👾