CVE-2023-35946
Gradle vulnerability analysis and mitigation

Overview

CVE-2023-35946 is a path traversal vulnerability affecting Gradle, a build automation tool. The vulnerability was discovered in versions prior to 7.6.2 and 8.0-8.1.1, and was disclosed on June 30, 2023. When Gradle writes a dependency into its dependency cache, it uses the dependency's coordinates to compute a file location. With specially crafted dependency coordinates, an attacker could make Gradle write files into unintended locations (GitHub Advisory).

Technical details

The vulnerability is classified as a path traversal issue (CWE-22) that allows writing files outside the intended dependency cache directory. The CVSS v3.1 base score is 6.9 (Medium) with the vector string CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L, indicating local attack vector with high complexity, no privileges required, and user interaction required. The vulnerability could be exploited through specially crafted dependency coordinates that contain path traversal elements (GitHub Advisory, NVD).

Impact

Successful exploitation of this vulnerability could lead to dependency cache poisoning or overwriting important files elsewhere on the filesystem where the Gradle process has write permissions. The impact is particularly severe as it could allow an attacker to replace legitimate dependencies with malicious ones or compromise the build environment (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in Gradle versions 7.6.2 and 8.2. The fix prevents caching of dependencies that have path traversal elements in their coordinates. For users unable to upgrade immediately, enabling dependency verification can make the vulnerability more difficult to exploit, as it requires attackers to either sign compromised dependencies with an already trusted key or modify the dependency verification metadata (GitHub 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