Dependency cache path traversal in Gradle

Summary

CVECVE-2023-35946
StatePUBLISHED
AssignerGitHub_M
Source PriorityCVE Program / NVD first with legacy fallback
Published2023-06-30 21:15:09 UTC
Updated2026-10-08 22:17:24 UTC
DescriptionGradle 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.

Risk And Classification

Primary CVSS: v3.1 5.5 MEDIUM from [email protected]

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

Problem Types: CWE-22 | CWE-22 CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')


VersionSourceTypeScoreSeverityVector
3.1[email protected]Primary5.5MEDIUMCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
3.1[email protected]Secondary6.9MEDIUMCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L
3.1CNADECLARED6.9MEDIUMCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L

CVSS v3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Gradle Gradle All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Gradle Gradle affected < 7.6.2 Not specified
CNA Gradle Gradle affected >= 8.0, < 8.2 Not specified

References

ReferenceSourceLinkTags
Merge pull request from GHSA-2h6c-rv6q-494v · gradle/gradle@b07e528 · GitHub af854a3a-2127-422b-91ae-364da2661108 github.com Patch, Third Party Advisory
Dependency cache path traversal · Advisory · gradle/gradle · GitHub af854a3a-2127-422b-91ae-364da2661108 github.com Mitigation, Third Party Advisory
Verifying dependencies af854a3a-2127-422b-91ae-364da2661108 docs.gradle.org Product, Vendor Advisory
CVE-2023-35946 Gradle Vulnerability in NetApp Products | NetApp Product Security af854a3a-2127-422b-91ae-364da2661108 security.netapp.com Third Party Advisory
Fix dependency cache path traversal vulnerability · gradle/gradle@859eae2 · GitHub af854a3a-2127-422b-91ae-364da2661108 github.com Patch, Third Party Advisory
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report