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
- Upgrade Gradle to version 8.14.4 or 9.3.0.
- Configure dependency verification and strict repository content filtering as workarounds if updating is not immediately possible.
How to check your project
- Check the project's Gradle wrapper or distribution version (e.g., in gradle/wrapper/gradle-wrapper.properties) to see if it falls within the affected ranges (introduced 0, fixed 8.14.4; introduced 9.0.0, fixed 9.3.0).
- Review declared repositories in build scripts for unused, outdated, or untrusted repository definitions.
Automated analysis of the published advisory data, generated 2026-11-23. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| 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 vector | Network |
|---|---|
| Attack complexity | High |
| Attack requirements | Present |
| Privileges required | None |
| User interaction | Passive |
| 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
References
- WEB https://github.com/gradle/gradle/security/advisories/GHSA-mqwm-5m85-gmcv
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-22865
- WEB https://github.com/gradle/gradle/commit/d38bfc0f1d4dabd38b305a67489bb8a6645138a1
- WEB https://github.com/gradle/gradle/commit/fa96c8bc7f7741e5dfa1da002c559afca3fa1fc1
- WEB https://docs.gradle.org/8.14.4/release-notes.html
- WEB https://docs.gradle.org/9.3.0/release-notes.html
- PACKAGE https://github.com/gradle/gradle
- WEB https://github.com/gradle/gradle/releases/tag/v8.14.4
- WEB https://github.com/gradle/gradle/releases/tag/v9.3.0
Source records: GHSA-mqwm-5m85-gmcv (OSV.dev) · EPSS by FIRST, 2026-11-23.