Every CVE Search/ Get API key

CVE-2023-35946

Dependency cache path traversal in Gradle

6.9 MediumFix available

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

0.28%Up 0.2 points since Jul 1, 2023
90%50%10%1%

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 MediumCVSS: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 MediumCVSS: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 MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L
CVSS 3.1
5.5 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L
CVSS 3.1
5.5 MediumCVSS: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

Affected packages
PackageAffectedFixed
gradle
Alpaquita:23
7.5.1-r3 up to 7.6.3-r0
7.6.3-r0
gradle
Bitnami
before 7.6.2, 8.0.0 up to 8.2.0
7.6.28.2.0
gradle
Debian: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 less
4.4.1-234.5.1-14.6-14.6-24.6-34.6-44.6-54.7-1
None known
gradle
Debian:13
All versions, plus listed versions
4.4.1-224.4.1-234.5.1-14.6-14.6-2
Show 4 moreShow less
4.6-34.6-44.6-54.7-1
None known
gradle
Debian:14
All versions, plus listed versions
4.4.1-224.4.1-234.5.1-14.6-14.6-2
Show 4 moreShow less
4.6-34.6-44.6-54.7-1
None known
gradle
SUSE:Linux Enterprise Module for Development Tools 15 SP5
before 4.4.1-150200.3.24.1
4.4.1-150200.3.24.1
gradle
SUSE:Linux Enterprise Module for Development Tools 15 SP6
before 4.4.1-150200.3.24.1
4.4.1-150200.3.24.1
gradle
openSUSE:Leap 15.5
before 4.4.1-150200.3.24.1
4.4.1-150200.3.24.1
gradle
openSUSE:Leap 15.6
before 4.4.1-150200.3.24.1
4.4.1-150200.3.24.1
gradle
Ubuntu: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
Affected packages
PackageAffectedFixed
gradle
Ubuntu: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
gradle
Ubuntu:20.04:LTS
All versions, plus listed versions
4.4.1-84.4.1-94.4.1-10
None known
gradle
Ubuntu:22.04:LTS
All versions, plus listed versions
4.4.1-13
None known
gradle
Ubuntu:24.04:LTS
All versions, plus listed versions
4.4.1-184.4.1-20
None known
gradle
Ubuntu:25.10
All versions, plus listed versions
4.4.1-22
None known
gradle
Ubuntu:26.10
All versions, plus listed versions
4.4.1-22ubuntu14.4.1-23
None known
gradle
Ubuntu:26.04:LTS
All versions, plus listed versions
4.4.1-224.4.1-22build14.4.1-22ubuntu1
None known

History

History
RecordedChangedSources
first indexedCVE 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

Show 8 moreShow less
MoveEnter Open