CVE-2026-22816: Gradle causes Failure to disable repositories can expose builds to malicious artifacts
Published 2026-11-23 · Updated 2026-11-23 · Also known as BIT-gradle-2026-22816, GHSA-w78c-w6vf-rw82
Summary
Gradle versions prior to 8.14.4 and 9.3.0 fail to stop dependency resolution when encountering unresolvable hostnames, allowing potentially malicious artifacts to be pulled from subsequent repositories. Engineering teams should upgrade to the patched versions or implement strict repository content filtering and dependency verification.
Who is affected
This vulnerability affects Gradle builds that rely on multiple repository definitions where one or more repository hosts may become unreachable due to DNS issues or configuration lapses. Under these conditions, an attacker could register an unreachable domain or intercept requests to provide malicious dependencies, bypassing expected resolution logic.
Exploitability
The vulnerability has a CVSS 4.0 base score but no computed base score provided, indicating a requirement for specific environmental conditions like user interaction or network-level positioning. With an EPSS score of 0.002, active exploitation is currently low, and the issue is not listed on the CISA Known Exploited Vulnerabilities catalog.
Remediation
- Upgrade Gradle to version 8.14.4 or 9.3.0 or later.
- Implement strict dependency verification to ensure only expected artifacts are resolved.
- Configure repository content filtering to restrict which dependencies can be retrieved from specific sources.
- Review and remove unused or outdated repository declarations from build configuration files.
How to check your project
- Run 'gradle --version' in the project root to determine the current version.
- Examine build.gradle or settings.gradle files to identify repository declaration order and existing repository content filtering settings.
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 happens if I cannot upgrade immediately?
You can mitigate the risk by enabling strict dependency verification and repository content filtering, which ensures that Gradle only accepts dependencies that match expected metadata regardless of repository availability.
Does this issue affect all Gradle builds?
It specifically affects builds where multiple repositories are defined and at least one repository host becomes unreachable or fails to resolve, causing Gradle to fallback to subsequent repositories.
Why does this pose a security risk?
If an attacker can cause a repository to become unreachable (e.g., via DNS issues), they can potentially substitute the expected repository with their own if they manage to acquire the expired domain or intercept traffic, leading to the injection of malicious build artifacts.
Original advisory description
References
- WEB https://github.com/gradle/gradle/security/advisories/GHSA-w78c-w6vf-rw82
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-22816
- WEB https://github.com/gradle/gradle/commit/4f2e3bbee4d0cee307dd97b684f11cfbe711b6f3
- WEB https://github.com/gradle/gradle/commit/e5707d0d8fce3d768c9c489004700d78eab1773a
- 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-w78c-w6vf-rw82 (OSV.dev) · EPSS by FIRST, 2026-11-23.