CVE-2026-22865
Gradle causes failure to disable repositories exposing builds to malicious artifacts
Also known as GHSA-mqwm-5m85-gmcv
Mitigation
- Upgrade org.gradle:gradle-core to one of 8.14.4, 9.3.0 (or later in the same release line).
Who should check
- Projects that depend on Maven package org.gradle:gradle-core (< 8.14.4)
Vulnerability facts
- Affected
- org.gradle:gradle-core < 8.14.4
- Fixed in
- 8.14.4, 9.3.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 8.6 (v4.0, GitHub)CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:H/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Attack requirements: Present
- Privileges required: None
- User interaction: Passive
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: None
- Confidentiality impact on other systems: None
- Integrity impact on other systems: High
- Availability impact on other systems: None
- EPSS
- 0.21% chance of exploitation in 30 days (percentile 7, 2026-11-26)
- CWE
- CWE-494, CWE-829
- Modified
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)
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Maven org.gradle:gradle-core | < 8.14.4 | 8.14.4, 9.3.0 | ghsa |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-22865. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-22865.md Affected: org.gradle:gradle-core < 8.14.4 Fixed in: 8.14.4, 9.3.0 Steps: 1. Search this machine and project for org.gradle:gradle-core (Maven): dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
Technologies
References
Patches
Other
FAQ
Is CVE-2026-22865 being exploited?
There is no confirmed exploitation: CVE-2026-22865 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.21% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-22865?
High: CVSS 8.6 (v4.0, scored by GitHub). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2026-22865?
org.gradle:gradle-core < 8.14.4.
Is there a fix for CVE-2026-22865?
Yes. Fixed in 8.14.4, 9.3.0. Upgrade org.gradle:gradle-core to one of 8.14.4, 9.3.0 (or later in the same release line).
How do I check if I'm affected by CVE-2026-22865?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.
More org.gradle:gradle-core vulnerabilities
See all| Severity | Identifier / vulnerability | Technology | Signals | Age |
|---|---|---|---|---|
| HIGH 8.6 | CVE-2026-22816 Gradle causes Failure to disable repositories can expose builds to malicious artifacts | Maven packages | EPSS 8% |