PT-2023-25398 · Gradle+2 · Gradle+2
Atorralba
+1
·
Published
2023-06-30
·
Updated
2025-04-11
·
CVE-2023-35947
CVSS v3.1
8.1
High
| Vector | AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
Gradle versions prior to 7.6.2
Gradle versions prior to 8.2
Description
This is a path traversal vulnerability when Gradle deals with Tar archives, often referenced as TarSlip, a variant of ZipSlip. When unpacking Tar archives, Gradle did not check that files could be written outside of the unpack location, which could lead to important files being overwritten anywhere the Gradle process has write permissions. For a build reading Tar entries from a Tar archive, this issue could allow Gradle to disclose information from sensitive files through an arbitrary file read. To exploit this behavior, an attacker needs to either control the source of an archive already used by the build or modify the build to interact with a malicious archive. Gradle uses Tar archives for its Build Cache, and if an attacker had control of a remote build cache server, they could inject malicious build cache entries that leverage this vulnerability.
Recommendations
For versions prior to 7.6.2, upgrade to Gradle 7.6.2 or later.
For versions prior to 8.2, upgrade to Gradle 8.2 or later.
If your build deals with Tar archives that you do not fully trust, inspect them to confirm they do not attempt to leverage this vulnerability.
If you use the Gradle remote build cache, make sure only trusted parties have write access to it and that connections to the remote cache are properly secured.
Exploit
Fix
Path traversal
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Debian
Gradle
Suse