CVE-2023-35947
Gradle vulnerability analysis and mitigation

Overview

CVE-2023-35947 is a path traversal vulnerability discovered in Gradle, a build automation tool. The vulnerability affects versions prior to 7.6.2 and versions 8.0 through 8.1.1. When dealing with Tar archives, Gradle failed to validate that files could be written outside of the unpack location, often referenced as TarSlip, a variant of ZipSlip. The vulnerability was disclosed on June 30, 2023, and has been patched in versions 7.6.2 and 8.2 (GitHub Advisory, NVD).

Technical details

The vulnerability stems from Gradle's handling of Tar archive entries without proper path validation. When unpacking Tar archives, the software did not verify whether files could be written outside the intended unpack location. The issue was identified in the TarFileTree.java component where the safeEntryName method returned entry names without validation. The vulnerability has received a CVSS v3.1 base score of 8.1 (HIGH) from NVD, with a vector string of CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

The vulnerability can lead to two primary security impacts: arbitrary file write and information disclosure. When unpacking Tar archives, attackers could potentially overwrite important files anywhere the Gradle process has write permissions. For builds reading Tar entries, the vulnerability could allow disclosure of sensitive information through arbitrary file read. The vulnerability is particularly concerning for Gradle's Build Cache feature, where a compromised remote build cache server could inject malicious build cache entries (GitHub Advisory).

Mitigation and workarounds

The primary mitigation is to upgrade to Gradle version 7.6.2 or 8.2 and above, where the software will refuse to handle Tar archives containing path traversal elements in entry names. For users unable to upgrade immediately, there are no direct workarounds. However, it is recommended to inspect any Tar archives that are not fully trusted and ensure that only trusted parties have write access to the Gradle remote build cache with properly secured connections (GitHub Advisory).

Community reactions

The vulnerability has received attention from major organizations, with NetApp issuing a security advisory (NTAP-20230803-0007) to assess the impact on their products. The security community has classified this as a variant of the known ZipSlip vulnerability pattern, highlighting the ongoing challenges with archive file handling in build tools (NetApp Advisory).

Additional resources


SourceThis report was generated using AI

Related Gradle vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-27148HIGH8.8
  • GradleGradle
  • gradle-8
NoYesFeb 25, 2025
CVE-2026-22865HIGH8.6
  • GradleGradle
  • gradle
NoYesJan 16, 2026
CVE-2026-22816HIGH8.6
  • GradleGradle
  • cpe:2.3:a:gradle:gradle
NoYesJan 16, 2026
CVE-2023-44387MEDIUM6.5
  • GradleGradle
  • gradle
NoYesOct 05, 2023
CVE-2023-42445MEDIUM5.3
  • GradleGradle
  • gradle
NoYesOct 06, 2023

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management