Skip to content
OpenAdvisories
Medium · 4.0 CVE-2021-29429 EUVD-2021-16060

Information disclosure through temporary directory permissions

Published Apr 12, 2021 · Updated Oct 8, 2026 · Assigned by GitHub_M

Description

In Gradle before version 7.0, files created with open permissions in the system temporary directory can allow an attacker to access information downloaded by Gradle. Some builds could be vulnerable to a local information disclosure. Remote files accessed through TextResourceFactory are downloaded into the system temporary directory first. Sensitive information contained in these files can be exposed to other local users on the same system. If you do not use the `TextResourceFactory` API, you are not vulnerable. As of Gradle 7.0, uses of the system temporary directory have been moved to the Gradle User Home directory. By default, this directory is restricted to the user running the build. As a workaround, set a more restrictive umask that removes read access to other users. When files are created in the system temporary directory, they will not be accessible to other users. If you are unable to change your system's umask, 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.

Affected products

VendorProductAffectedFixed
gradle gradle < 7.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 gradle No fix yet —
Debian 13 gradle No fix yet —
Debian 12 gradle No fix yet —
ReleasePackageFixed inAdvisory
SLES 15 SP5 gradle 4.4.1-150200.3.15.1 SUSE-SU-2024:1119-1
SLES 15 SP4 gradle 4.4.1-150200.3.15.1 SUSE-SU-2024:1119-1
SLES 15 SP3 gradle 4.4.1-150200.3.15.1 SUSE-SU-2024:1119-1
SLES 15 SP2 gradle 4.4.1-150200.3.15.1 SUSE-SU-2024:1119-1
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP4 gradle 4.4.1-150200.3.15.1 SUSE-SU-2024:1119-1
SLES for SAP 15 SP3 gradle 4.4.1-150200.3.15.1 SUSE-SU-2024:1119-1
SLES for SAP 15 SP2 gradle 4.4.1-150200.3.15.1 SUSE-SU-2024:1119-1
SLE HPC 15 SP4 gradle 4.4.1-150200.3.15.1 SUSE-SU-2024:1119-1
SLE HPC 15 SP3 gradle 4.4.1-150200.3.15.1 SUSE-SU-2024:1119-1
SLE HPC 15 SP2 gradle 4.4.1-150200.3.15.1 SUSE-SU-2024:1119-1
SUSE Enterprise Storage 7.1 gradle 4.4.1-150200.3.15.1 SUSE-SU-2024:1119-1
ReleasePackageFixed inAdvisory
openSUSE Leap 15.5 gradle 4.4.1-150200.3.15.1 SUSE-SU-2024:1119-1
openSUSE Leap 15.5 gradle-bootstrap 4.4.1-150200.3.9.1 SUSE-SU-2024:1119-1

Advisories 1

References