CVE-2023-35946
Dependency cache path traversal in Gradle
Gradle is a build tool with a focus on build automation and support for multi-language development. 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, Gradle can be made to write files into an unintended location. The file may be written outside the dependency cache or over another file in the dependency cache. This vulnerability could be used to poison the dependency cache or overwrite important files elsewhere on the filesystem where the Gradle process has write permissions. Exploiting this vulnerability requires an attacker to have control over a dependency repository used by the Gradle build or have the ability to modify the build's configuration. It is unlikely that this would go unnoticed. A fix has been released in Gradle 7.6.2 and 8.2 to protect against this vulnerability. Gradle will refuse to cache dependencies that have path traversal elements in their dependency coordinates. It is recommended that users upgrade to a patched version. If you are unable to upgrade to Gradle 7.6.2 or 8.2, dependency verification will make this vulnerability more difficult to exploit.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- High
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
6.9
Dependency cache path traversal in Gradle
Gradle is a build tool with a focus on build automation and support for multi-language development. 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, Gradle can be made to write files into an unintended location. The file may be written outside the dependency cache or over another file in the dependency cache. This vulnerability could be used to poison the dependency cache or overwrite important files elsewhere on the filesystem where the Gradle process has write permissions. Exploiting this vulnerability requires an attacker to have control over a dependency repository used by the Gradle build or have the ability to modify the build's configuration. It is unlikely that this would go unnoticed. A fix has been released in Gradle 7.6.2 and 8.2 to protect against this vulnerability. Gradle will refuse to cache dependencies that have path traversal elements in their dependency coordinates. It is recommended that users upgrade to a patched version. If you are unable to upgrade to Gradle 7.6.2 or 8.2, dependency verification will make this vulnerability more difficult to exploit.
- Record
CVE-2023-35946- CVSS 3.1
- 6.9 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L - Weakness
- CWE-22
- Updated
- 2026-11-02
EUVDEUVD-2023-39930
6.9
Gradle is a build tool with a focus on build automation and support for multi-language development. 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, Gradle can be made to write files into an unintended location. The file may be written outside the dependency cache or over another file in the dependency cache. This vulnerability could be used to poison the dependency cache or overwrite important files elsewhere on the filesystem where the Gradle process has write permissions. Exploiting this vulnerability requires an attacker to have control over a dependency repository used by the Gradle build or have the ability to modify the build's configuration. It is unlikely that this would go unnoticed. A fix has been released in Gradle 7.6.2 and 8.2 to protect against this vulnerability. Gradle will refuse to cache dependencies that have path traversal elements in their dependency coordinates. It is recommended that users upgrade to a patched version. If you are unable to upgrade to Gradle 7.6.2 or 8.2, dependency verification will make this vulnerability more difficult to exploit.
- Record
EUVD-2023-39930- CVSS 3.1
- 6.9 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L - Updated
- 2026-11-02
NVD
6.9
Gradle is a build tool with a focus on build automation and support for multi-language development. 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, Gradle can be made to write files into an unintended location. The file may be written outside the dependency cache or over another file in the dependency cache. This vulnerability could be used to poison the dependency cache or overwrite important files elsewhere on the filesystem where the Gradle process has write permissions. Exploiting this vulnerability requires an attacker to have control over a dependency repository used by the Gradle build or have the ability to modify the build's configuration. It is unlikely that this would go unnoticed. A fix has been released in Gradle 7.6.2 and 8.2 to protect against this vulnerability. Gradle will refuse to cache dependencies that have path traversal elements in their dependency coordinates. It is recommended that users upgrade to a patched version. If you are unable to upgrade to Gradle 7.6.2 or 8.2, dependency verification will make this vulnerability more difficult to exploit.
- Record
CVE-2023-35946- CVSS 3.1
- 6.9 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L - CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVBELL-CVE-2023-35946
5.5
- Record
BELL-CVE-2023-35946- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSV
6.9
Dependency cache path traversal in Gradle
Gradle is a build tool with a focus on build automation and support for multi-language development. 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, Gradle can be made to write files into an unintended location. The file may be written outside the dependency cache or over another file in the dependency cache. This vulnerability could be used to poison the dependency cache or overwrite important files elsewhere on the filesystem where the Gradle process has write permissions. Exploiting this vulnerability requires an attacker to have control over a dependency repository used by the Gradle build or have the ability to modify the build's configuration. It is unlikely that this would go unnoticed. A fix has been released in Gradle 7.6.2 and 8.2 to protect against this vulnerability. Gradle will refuse to cache dependencies that have path traversal elements in their dependency coordinates. It is recommended that users upgrade to a patched version. If you are unable to upgrade to Gradle 7.6.2 or 8.2, dependency verification will make this vulnerability more difficult to exploit.
- Record
CVE-2023-35946- CVSS 3.1
- 6.9 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2023-35946
5.5
Gradle is a build tool with a focus on build automation and support for multi-language development. 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, Gradle can be made to write files into an unintended location. The file may be written outside the dependency cache or over another file in the dependency cache. This vulnerability could be used to poison the dependency cache or overwrite important files elsewhere on the filesystem where the Gradle process has write permissions. Exploiting this vulnerability requires an attacker to have control over a dependency repository used by the Gradle build or have the ability to modify the build's configuration. It is unlikely that this would go unnoticed. A fix has been released in Gradle 7.6.2 and 8.2 to protect against this vulnerability. Gradle will refuse to cache dependencies that have path traversal elements in their dependency coordinates. It is recommended that users upgrade to a patched version. If you are unable to upgrade to Gradle 7.6.2 or 8.2, dependency verification will make this vulnerability more difficult to exploit.
- Record
DEBIAN-CVE-2023-35946- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2023-35946
6.9
Gradle is a build tool with a focus on build automation and support for multi-language development. 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, Gradle can be made to write files into an unintended location. The file may be written outside the dependency cache or over another file in the dependency cache. This vulnerability could be used to poison the dependency cache or overwrite important files elsewhere on the filesystem where the Gradle process has write permissions. Exploiting this vulnerability requires an attacker to have control over a dependency repository used by the Gradle build or have the ability to modify the build's configuration. It is unlikely that this would go unnoticed. A fix has been released in Gradle 7.6.2 and 8.2 to protect against this vulnerability. Gradle will refuse to cache dependencies that have path traversal elements in their dependency coordinates. It is recommended that users upgrade to a patched version. If you are unable to upgrade to Gradle 7.6.2 or 8.2, dependency verification will make this vulnerability more difficult to exploit.
- Record
UBUNTU-CVE-2023-35946- CVSS 3.1
- 6.9 Medium
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L - CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVBIT-gradle-2023-35946 No score
Dependency cache path traversal in Gradle
Gradle is a build tool with a focus on build automation and support for multi-language development. 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, Gradle can be made to write files into an unintended location. The file may be written outside the dependency cache or over another file in the dependency cache. This vulnerability could be used to poison the dependency cache or overwrite important files elsewhere on the filesystem where the Gradle process has write permissions. Exploiting this vulnerability requires an attacker to have control over a dependency repository used by the Gradle build or have the ability to modify the build's configuration. It is unlikely that this would go unnoticed. A fix has been released in Gradle 7.6.2 and 8.2 to protect against this vulnerability. Gradle will refuse to cache dependencies that have path traversal elements in their dependency coordinates. It is recommended that users upgrade to a patched version. If you are unable to upgrade to Gradle 7.6.2 or 8.2, dependency verification will make this vulnerability more difficult to exploit.
- Record
BIT-gradle-2023-35946- Updated
- 2026-11-02
OSVSUSE-SU-2024:3163-1 No score
Security update for gradle
This update for gradle fixes the following issues:
- CVE-2023-35946: Fixed a dependency issue leading the cache to write files into an unintended location. (bsc#1212930)
- Record
SUSE-SU-2024:3163-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
gradleAlpaquita:23 |
7.5.1-r3 up to 7.6.3-r0 | 7.6.3-r0 |
gradleBitnami |
before 7.6.2, 8.0.0 up to 8.2.0 | 7.6.28.2.0 |
gradleDebian:12 |
All versions, plus listed versions 4.4.1-184.4.1-194.4.1-204.4.1-214.4.1-22 Show 8 moreShow less4.4.1-234.5.1-14.6-14.6-24.6-34.6-44.6-54.7-1 |
None known |
gradleDebian:13 |
All versions, plus listed versions 4.4.1-224.4.1-234.5.1-14.6-14.6-2 Show 4 moreShow less4.6-34.6-44.6-54.7-1 |
None known |
gradleDebian:14 |
All versions, plus listed versions 4.4.1-224.4.1-234.5.1-14.6-14.6-2 Show 4 moreShow less4.6-34.6-44.6-54.7-1 |
None known |
gradleSUSE:Linux Enterprise Module for Development Tools 15 SP5 |
before 4.4.1-150200.3.24.1 | 4.4.1-150200.3.24.1 |
gradleSUSE:Linux Enterprise Module for Development Tools 15 SP6 |
before 4.4.1-150200.3.24.1 | 4.4.1-150200.3.24.1 |
gradleopenSUSE:Leap 15.5 |
before 4.4.1-150200.3.24.1 | 4.4.1-150200.3.24.1 |
gradleopenSUSE:Leap 15.6 |
before 4.4.1-150200.3.24.1 | 4.4.1-150200.3.24.1 |
gradleUbuntu:16.04:LTS |
All versions, plus listed versions 2.5-32.7-12.7-22.7-32.10-1 |
None known |
Show 7 moreShow less
| Package | Affected | Fixed |
|---|---|---|
gradleUbuntu:Pro:18.04:LTS |
All versions, plus listed versions 3.2.1-3build23.2.1-43.2.1-53.4.1-43.4.1-63.4.1-7ubuntu14.4.1-5ubuntu2~18.044.4.1-5ubuntu2~18.04+esm1 |
None known |
gradleUbuntu:20.04:LTS |
All versions, plus listed versions 4.4.1-84.4.1-94.4.1-10 |
None known |
gradleUbuntu:22.04:LTS |
All versions, plus listed versions 4.4.1-13 |
None known |
gradleUbuntu:24.04:LTS |
All versions, plus listed versions 4.4.1-184.4.1-20 |
None known |
gradleUbuntu:25.10 |
All versions, plus listed versions 4.4.1-22 |
None known |
gradleUbuntu:26.10 |
All versions, plus listed versions 4.4.1-22ubuntu14.4.1-23 |
None known |
gradleUbuntu:26.04:LTS |
All versions, plus listed versions 4.4.1-224.4.1-22build14.4.1-22ubuntu1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-35946 is a medium vulnerability (CVSS 6.9) in Gradle, published June 30, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.28%, the 20th percentile. Fixed in gradle 7.6.3-r0.
References
github.com/gradle/gradle/security/advisories/GHSA-2h6c-rv6q-494v
github.com/gradle/gradle/commit/859eae2b2acf751ae7db3c9ffefe275aa5da0d5d
github.com/gradle/gradle/commit/b07e528feb3a5ffa66bdcc358549edd73e4c8a12
docs.gradle.org/current/userguide/dependency_verification.html
security.netapp.com/advisory/ntap-20230731-0003
docs.bell-sw.com/security/cves/CVE-2023-35946
Show 8 moreShow less
nvd.nist.gov/vuln/detail/CVE-2023-35946
github.com/CVEProject/cvelistV5/tree/main/cves/2023/35xxx/CVE-2023-35946.json
security-tracker.debian.org/tracker/CVE-2023-35946
suse.com/support/update/announcement/2024/suse-su-20243163-1
bugzilla.suse.com/1212930
suse.com/security/cve/CVE-2023-35946
ubuntu.com/security/CVE-2023-35946
cve.org/CVERecord?id=CVE-2023-35946