CVE-2021-29427
Gradle vulnerability analysis and mitigation

Overview

In Gradle versions from 5.1 to 6.8.3, there exists a vulnerability (CVE-2021-29427) related to repository content filtering, a security control feature. The vulnerability was discovered and disclosed in April 2021, affecting the Gradle build automation tool. The issue specifically occurs when repository content filtering is used within a pluginManagement block in settings files, potentially compromising the intended security controls (GitHub Advisory).

Technical details

The vulnerability stems from Gradle ignoring content filters and searching all repositories for dependencies when repository content filtering is used within a pluginManagement block in settings files. This behavior affects how dependencies are resolved for Gradle plugins and build scripts. The issue has been assigned a CVSS v3.1 base score of 8.0 (HIGH) with the vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H, indicating a network-based attack vector with high complexity and required privileges (GitHub Advisory).

Impact

The vulnerability presents two primary risks: 1) Information disclosure, where Gradle could make dependency requests to repositories outside an organization and leak internal package identifiers, and 2) Dependency poisoning/Dependency confusion, where Gradle could download malicious binaries from repositories outside the organization due to name squatting (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in Gradle 7.0, and users relying on this feature are recommended to upgrade as soon as possible. For those unable to upgrade immediately, two workarounds are available: 1) Use a company repository with appropriate rules for fetching packages from public repositories, or 2) Use project level repository content filtering inside buildscript.repositories, which has been available since Gradle 5.1 (GitHub Advisory, Release Notes).

Community reactions

The vulnerability was responsibly disclosed by Zac Sweers from Slack, highlighting the security community's active role in identifying and reporting security issues in build tools. The issue was introduced in response to the "A Confusing Dependency" blog post, which initially prompted the implementation of repository content filtering as a security control (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
  • cpe:2.3:a:gradle:gradle
NoYesFeb 25, 2025
CVE-2023-35947HIGH8.1
  • GradleGradle
  • gradle
NoYesJun 30, 2023
CVE-2023-44387MEDIUM6.5
  • GradleGradle
  • gradle
NoYesOct 05, 2023
CVE-2023-39152MEDIUM6.5
  • JavaJava
  • org.jenkins-ci.plugins:gradle
NoYesJul 26, 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