Skip to main content
Public proof of conceptFix available

CVE-2021-29427

A public proof of concept exists; no exploitation attested.

  • Published2021-04-13
  • Fixed in7.0
  • WeaknessCWE-829

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

In Gradle from version 5.1 and before version 7.0 there is a vulnerability which can lead to information disclosure and/or dependency poisoning. Repository content filtering is a security control Gradle introduced to help users specify what repositories are used to resolve specific dependencies. This feature was introduced in the wake of the "A Confusing Dependency" blog post. In some cases, Gradle may ignore content filters and search all repositories for dependencies. This only occurs when repository content filtering is used from within a `pluginManagement` block in a settings file. This may change how dependencies are resolved for Gradle plugins and build scripts. For builds that are vulnerable, there are two risks: 1) Information disclosure: Gradle could make dependency requests to repositories outside your organization and leak internal package identifiers. 2) Dependency poisoning/Dependency confusion: Gradle could download a malicious binary from a repository outside your organization due to name squatting. For a full example and more details refer to the referenced GitHub Security Advisory. The problem has been patched and released with Gradle 7.0. Users relying on this feature should upgrade their build as soon as possible. As a workaround, users may use a company repository which has the right rules for fetching packages from public repositories, or use project level repository content filtering, inside `buildscript.repositories`. This option is available since Gradle 5.1 when the feature was introduced.

Timeline

dates in UTC
  1. 2021-04-1320:15CVE publishedNVD

Versions per branch

NVD · OSV
Gradle
BranchAffectedFixed in
7.0≥ 5.1, < 7.07.0
gradle
BranchAffectedFixed in
7.0≥ 5.1.0, < 7.0.07.0.0
Quarkus
BranchAffectedFixed in
2.2≤ 2.2.3no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • eco-java-gradle-5.1Chainguardall versions · no fixed version listedand 79 other packages

Vendor advisories

  • CVE-2021-29427 Red Hat Product Security1 product fixed · 2 known affected

    gradle: repository content filters do not work in Settings pluginManagement

    gradle as a component of Red Hat build of Quarkus · gradle as a component of Red Hat Integration Camel K 1

  • RHSA-2022:4623 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: Red Hat build of Quarkus 2.7.5 release and security update

Full record on NVD

Fix

  1. Update Gradle to 7.0
  2. Vendor fix Red Hat Product Security RHSA-2022:4623 · 1 productBefore applying the update, back up your existing installation, including all applications, configuration files, databases and database settings, and so on. The References section of this erratum contains a download link for the update. You must be logged in to download the update.
  3. No fix available, says the vendor Red Hat Product Security CVE-2021-29427 · 1 productFix deferred
  4. No fix available, says the vendor Red Hat Product Security CVE-2021-29427 · 1 productAffected

Advisories and patches

Detection

read 2026-11-01 01:02 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Published
2021-04-13
Last Modified
2026-06-17
NVD status
Modified
GitHub Advisory
GHSA-jvmj-rh6q-x395

Frequently asked questions

What is CVE-2021-29427?

In Gradle from version 5.1 and before version 7.0 there is a vulnerability which can lead to information disclosure and/or dependency poisoning. Repository content filtering is a security control Gradle introduced to help users specify what repositories are used to resolve specific dependencies. This feature was introduced in the wake of the "A Confusing Dependency" blog post. In some cases, Gradle may ignore content filters and search all repositories for dependencies. This only occurs when repository content filtering is used from within a `pluginManagement` block in a settings file. This may change how dependencies are resolved for Gradle plugins and build scripts. For builds that are vulnerable, there are two risks: 1) Information disclosure: Gradle could make dependency requests to repositories outside your organization and leak internal package identifiers. 2) Dependency poisoning/Dependency confusion: Gradle could download a malicious binary from a repository outside your organization due to name squatting. For a full example and more details refer to the referenced GitHub Security Advisory. The problem has been patched and released with Gradle 7.0. Users relying on this feature should upgrade their build as soon as possible. As a workaround, users may use a company repository which has the right rules for fetching packages from public repositories, or use project level repository content filtering, inside `buildscript.repositories`. This option is available since Gradle 5.1 when the feature was introduced.

Is CVE-2021-29427 actively exploited?

Active exploitation of CVE-2021-29427 has not been confirmed. Its EPSS score was 1.3% on 2026-11-08, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2021-29427?

CVE-2021-29427 has a CVSS v3 base score of 7.2 (HIGH severity), with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H.

Running gradle? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record