AgentbeamBeta
Open-source package vulnerability · Maven

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

highCVSS 4.0 8.6GHSA-mqwm-5m85-gmcv

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.

Published Nov 23, 2026

Affected packages

org.gradle:gradle-core

Ecosystem
Maven
Affected
< 8.14.4
Fixed in
8.14.4
Check
mvn dependency:tree -Dincludes=org.gradle:gradle-core

org.gradle:gradle-core

Ecosystem
Maven
Affected
>= 9.0.0, < 9.3.0
Fixed in
9.3.0
Check
mvn dependency:tree -Dincludes=org.gradle:gradle-core

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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` 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 and / or dependency verification, your build is safe from the potential vulnerabilities described above.

If you cannot update to a newer Gradle version, configuring dependency verification 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

Credited to ljacomet, TheGoesen, Vampire, KostyaSha.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More Maven vulnerabilities

All Maven entries