HIGH · CVSS 4.0 EPSS 0.2% · 5th percentile CWE-494CWE-829

CVE-2026-22865: Gradle causes failure to disable repositories exposing builds to malicious artifacts

Published 2026-11-23 · Updated 2026-11-23 · Also known as BIT-gradle-2026-22865, GHSA-mqwm-5m85-gmcv

Summary

Gradle incorrectly treats certain persistent transient errors as non-fatal, allowing builds to fall back to subsequent repositories and potentially resolve malicious artifacts. Engineering and security teams using affected Gradle versions must update their build tools.

Who is affected

When dependency resolution encounters connection errors after maximum retries on an affected repository, Gradle continues to the next repository in declaration order instead of failing securely. This flaw can be exploited if an attacker can disrupt the primary repository and control a fallback repository to serve malicious artifacts.

Exploitability

The vulnerability requires network access and specific conditions where an attacker can disrupt repository connectivity while controlling a subsequent fallback repository. It carries a CVSS base score with high impacts on integrity and confidentiality vectors, though active exploitation is not documented by CISA KEV.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-23. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
Maven org.gradle:gradle-core >= 0, < 8.14.4 8.14.4 -
Maven org.gradle:gradle-core >= 9.0.0, < 9.3.0 9.3.0 -

CVSS 4.0 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

Attack vectorNetwork
Attack complexityHigh
Attack requirementsPresent
Privileges requiredNone
User interactionPassive
Confidentiality (vulnerable system)High
Integrity (vulnerable system)High
Availability (vulnerable system)None
Confidentiality (subsequent systems)None
Integrity (subsequent systems)High
Availability (subsequent systems)None

Base score is not computed for CVSS 4.0 vectors; severity is taken from the advisory.

FAQ

What causes the vulnerability in Gradle?

Certain transient connection errors, such as NoHttpResponseException persisting after maximum retries, were previously not treated as fatal errors, causing Gradle to incorrectly continue searching subsequent repositories.

Which versions of Gradle are affected?

Versions introduced from 0 before 8.14.4, and versions introduced from 9.0.0 before 9.3.0, are affected.

Are there workarounds if I cannot upgrade immediately?

Yes, using strict repository content filtering and dependency verification can protect builds from resolving unexpected or malicious artifacts.

Original advisory description
### Impact When resolving dependencies, Gradle searches repositories in declaration order. If it encounters connection errors, Gradle will disable the repository and fail dependency resolution. This is necessary for both reproducibility and security reasons to prevent dependencies from being resolved from other repositories without warning. In previous versions of Gradle, 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. #### Vulnerability caused by continuing after max retries on transient errors An exception like [`NoHttpResponseException`](https://hc.apache.org/httpclient-legacy/exception-handling.html#org_apache_commons_httpclient_NoHttpResponseException) can indicate transient errors. If the errors persist after a maximum number of retries, Gradle would continue to the next repository. This behavior could allow an attacker to disrupt the service of a repository and leverage another repository to serve malicious artifacts. This attack requires the attacker to have control over a repository after the disrupted repository. ### Patches Gradle has introduced a change in behavior in Gradle 9.3.0 and 8.14.4 to stop searching other repositories when encountering these errors. Upgrading to either version will protect you against the vulnerabilities described here. ### Workarounds If you are using strict [repository content filtering](https://docs.gradle.org/9.3.0/userguide/filtering_repository_content.html#header) and / or [dependency verification](https://docs.gradle.org/9.3.0/userguide/dependency_verification.html), your build is safe from the potential vulnerabilities described above. If you cannot update to a newer Gradle version, configuring [dependency verification](https://docs.gradle.org/9.3.0/userguide/dependency_verification.html) is the best way to make sure your build resolves the dependencies you expect and nothing else. You should also review which repositories your builds use to check for unused or outdated repository declarations. ### Related * [Security feature of failing fast on bad repos does not seem to be implemented](https://github.com/gradle/gradle/issues/35927) * [Repository disabling](https://docs.gradle.org/current/userguide/graph_resolution.html#sec:repository-disabling) * [Advisory about repositories with unknown host](https://github.com/gradle/gradle/security/advisories/GHSA-w78c-w6vf-rw82)

References

Source records: GHSA-mqwm-5m85-gmcv (OSV.dev) · EPSS by FIRST, 2026-11-23.