CVE-2026-22816

Gradle fails to disable repositories which can expose builds to malicious artifacts

Published Jan 16, 2026 CVSS 4.0 · 8.6 High EPSS < 1% KEV · Not listed
Description
Gradle is a build automation tool, and its native-platform tool provides Java bindings for native APIs. When resolving dependencies in versions before 9.3.0, some exceptions were not treated as fatal errors and would not cause a repository to be disabled. If a build encountered one of these exceptions, Gradle would continue to the next repository in the list and potentially resolve dependencies from a different repository. If a Gradle build used an unresolvable host name, Gradle would continue to work as long as all dependencies could be resolved from another repository. An unresolvable host name could be caused by allowing a repository's domain name registration to lapse or typo-ing the real domain name. This behavior could allow an attacker to register a service under the host name used by the build and serve malicious artifacts. The attack requires the repository to be listed before others in the build configuration. Gradle has introduced a change in behavior in Gradle 9.3.0 to stop searching other repositories when encountering these errors.

Analysis

AI-generated

Technical impact

Gradle versions prior to 9.3.0 did not treat certain dependency‑resolution exceptions as fatal, allowing the build process to continue to subsequent repositories. An unresolvable host name or a repository that throws an exception could be exploited by an attacker who registers a domain matching the build’s repository name to supply malicious artifacts. The victim build would then incorporate these artifacts, potentially leading to remote code execution or the introduction of compromised binaries into released products.

Affected Systems

The vulnerability affects Gradle Gradle, the Java build automation tool, in all releases prior to 9.3.0. Any project configuration that specifies one or more remote repositories and does not disable faulty repositories on error is susceptible.

Risk and Exploitability

The CVSS score of 8.6 indicates a high severity risk, but the EPSS score of less than 1% suggests that the probability of exploitation is currently low. The vulnerability is not listed in the CISA KEV catalog. Attackers would need to know the build’s repository list and ensure their rogue host appears early in that list, so the exploit is feasible but requires targeted preparation. Damage can range from malicious code insertion to supply‑chain compromise depending on the artifact content.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Gradle to version 9.3.0 or newer, which stops searching additional repositories upon encountering resolution errors.
  • Verify that repository ordering in your build scripts places trusted repositories earlier and removes or replaces any expired or potentially spoofable hostnames.
  • If upgrading immediately is not feasible, restrict network access to Gradle repositories or use an internal proxy to control artifact sources until the patch is applied.

Generated by OpenCVE AI on April 18, 2026 at 05:37 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:gradle:gradle:*:*:*:*:*:*:*:*
Metrics cvssV3_1

{'score': 7.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Gradle
Gradle gradle
Vendors & Products Gradle
Gradle gradle
Type Values Removed Values Added
Description Gradle is a build automation tool, and its native-platform tool provides Java bindings for native APIs. When resolving dependencies in versions before 9.3.0, some exceptions were not treated as fatal errors and would not cause a repository to be disabled. If a build encountered one of these exceptions, Gradle would continue to the next repository in the list and potentially resolve dependencies from a different repository. If a Gradle build used an unresolvable host name, Gradle would continue to work as long as all dependencies could be resolved from another repository. An unresolvable host name could be caused by allowing a repository's domain name registration to lapse or typo-ing the real domain name. This behavior could allow an attacker to register a service under the host name used by the build and serve malicious artifacts. The attack requires the repository to be listed before others in the build configuration. Gradle has introduced a change in behavior in Gradle 9.3.0 to stop searching other repositories when encountering these errors.
Title Gradle fails to disable repositories which can expose builds to malicious artifacts
Weaknesses CWE-494
CWE-829
References
Metrics cvssV4_0

{'score': 8.6, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:H/SA:N'}

Weaknesses
  • CWE-494

    Download of Code Without Integrity Check

  • CWE-829

    Inclusion of Functionality from Untrusted Control Sphere

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jan 20, 2026, 2:49 PM
Reserved
Jan 9, 2026, 10:50 PM
Status
Analyzed
Published
Jan 16, 2026, 11:15 PM
Modified
Jun 17, 2026, 10:20 AM