Exploited now
Vulnerability WatchVulnerabilities, exploits & advisories — updated every 15 minutes
Alerts

Home › CVE › Java

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

High · CVSS 8.6EPSS 0.2% First seen November 23, 2026

One of 2 maven:org.gradle:gradle-core vulnerabilities published together by GitHub Advisory: our article covers all of them.

JavaWebVulnerabilities

Research article

Gradle CVE-2026-22865: a failing earlier repository can let a later one serve malicious build artifacts

CVECVE-2026-22865
Vendor and productmaven:org.gradle:gradle-core
PublishedNovember 23, 2026 16:11 UTC
Research cut-offNovember 23, 2026 16:05 UTC
Sources reviewed5: NVD record (last modified 2026-06-17); CISA KEV catalog; GitHub advisory (2026-11-23); vendor advisory page (github.com)

Executive summary

CVE-2026-22865 is a Gradle build-tool flaw classified as CWE-494 and CWE-829, in which Gradle keeps searching later repositories after an earlier one fails with certain transient errors, so a build can fetch dependencies from a repository that was not intended [1, 3, 4]. NVD lists CVSS 4.0 8.6 High with 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 and CVSS 3.1 7.4 High with vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N [1]. Per NVD and the GitHub advisory, affected releases are below 8.14.4 and from 9.0.0 up to but not including 9.3.0, with fixes in 8.14.4 and 9.3.0 [1, 3]. Exploitation requires an attacker to disrupt a repository declared earlier in the build and to control a repository declared after it [4]. The reviewed sources do not show confirmed exploitation, and the CVE is not in the CISA KEV catalog as of 2026-11-23 [2, 5]. The most important immediate action is to upgrade Gradle to 8.14.4 or 9.3.0 and, where upgrading is not possible, to enable dependency verification [3, 4].

Key points

  • CVE-2026-22865 affects Gradle, where a failing earlier repository can be followed by a later, attacker-controlled repository in declaration order [1, 4]
  • NVD scores are CVSS 4.0 8.6 High and CVSS 3.1 7.4 High [1]
  • Affected releases are below 8.14.4 and from 9.0.0 up to but not including 9.3.0; fixed in 8.14.4 and 9.3.0 [1, 3]
  • Exploitation requires an attacker to disrupt an earlier repository and control a later one; no exploitation in the wild is confirmed by the reviewed sources [2, 4, 5]
  • The CVE record range below 9.3.0 conflicts with the NVD and GitHub ranges [1, 3]

Vulnerability identification

FieldDetail
CVE IDCVE-2026-22865 [1, 3]
Vendor and productGradle, a build automation tool [1, 3]
Componentorg.gradle:gradle-core package [3]
Advisory identifierGHSA-mqwm-5m85-gmcv [1, 3, 4]
NVD published / last modified2026-01-16T23:15:50 / 2026-06-17T10:20:31 [1]
GitHub advisory published / updated2026-11-23T15:41:57 / 2026-11-23T15:41:58 [3]
NVD record statusAnalyzed [1]
CWECWE-494 Download of Code Without Integrity Check; CWE-829 Inclusion of Functionality from Untrusted Control Sphere [1, 3]
CVSS 4.0 (NVD secondary, GitHub)8.6 High; NVD 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X; GitHub vector omits the threat and environmental metrics [1, 3]
CVSS 3.1 (NVD primary)7.4 High; CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N [1]
Related advisoryGHSA-w78c-w6vf-rw82, concerning repositories with an unknown host [4]

The two CVSS versions differ in user interaction: the 4.0 vector has UI:P and the 3.1 vector has UI:N [1]. The scores are from different metric versions and are not contradictory.

Vulnerability description

The flaw breaks the integrity of dependency resolution. Gradle is designed to fail closed when a dependency repository has connection problems, so that dependencies are not silently taken from another source. Older releases did not treat some network exceptions as fatal, so the failing repository stayed enabled and resolution moved on to the next repository in the declaration order [4]. An attacker who can disrupt the service of an earlier repository and who controls a later one can therefore cause the build to receive artifacts from the attacker-controlled repository [4]. The security property affected is the integrity and provenance of resolved build inputs, which is why the vendor maps the issue to CWE-494 and CWE-829 [1, 3, 4].

Attack surface and exploitation prerequisites

PrerequisiteAssessment
Network accessNetwork-reachable per AV:N in both vectors [1, 3]
Attack complexityHigh (AC:H) in both vectors [1, 3]
Attack requirementsPresent (AT:P) in the CVSS 4.0 vector; the vendor describes the required conditions as disruption of an earlier repository and control of a later one [1, 4]
PrivilegesNone required (PR:N) [1, 3]
User interactionUI:P in the 4.0 vector and UI:N in the 3.1 vector [1]
Required configurationA build that declares more than one repository, with an attacker-controlled repository after a repository that can be disrupted [4]
Affected Gradle versionsSee the affected products section [1, 3]

The attack-requirement and user-interaction values come from the vectors only. The vendor text confirms the repository-order dependency [4]. Whether a particular build reaches the vulnerable path also depends on the repositories it declares and on the Gradle version it runs.

Impact analysis

Security propertyTechnically described impact
ConfidentialityHigh impact in the CVSS 3.1 vector (C:H) [1]
IntegrityHigh impact in both vectors (VI:H, I:H) [1]
AvailabilityNo availability impact on the vulnerable system in the vectors (VA:N, A:N) [1]
Authentication and authorizationNo privilege requirement (PR:N) [1]
Downstream consequencesAnalyst assessment: artifacts from an untrusted repository may be compiled, packaged or executed in build and CI environments, which could compromise build outputs and the systems the build runs on. The vendor describes the artifacts as malicious but does not state the consequences in detail [4]

The CVSS vectors describe the vulnerable system, not a particular organization's risk. The downstream consequences above are an analyst assessment and depend on what the build does with the resolved artifacts.

Affected products and versions

SourceAffected rangeFixed versionQualification
NVD CPE configuration [1]Below 8.14.4; 9.0.0 up to but not including 9.3.08.14.4 and 9.3.0Matches the GitHub advisory
GitHub advisory, org.gradle:gradle-core [3]Below 8.14.4; 9.0.0 up to but not including 9.3.08.14.4 and 9.3.0Matches NVD
CVE record, vendor (CNA) [1]Below 9.3.09.3.0Conflicts with the NVD and GitHub ranges, which treat the 8.14.x line as fixed at 8.14.4
Vendor advisory page [4]Earlier releases that treat these errors as non-fatal8.14.4 and 9.3.0Confirms the fixed releases

The newest authoritative sources are the GitHub advisory and the vendor advisory page, both of which name 8.14.4 and 9.3.0 as fixed [3, 4]. Under those sources, 8.14.4 and later on the 8.x line and 9.3.0 and later are not affected. The CVE record range below 9.3.0 would include releases the other sources do not list, so the record should be read with that conflict in mind [1, 3].

Exploitation and threat intelligence status

Exploitation in the wild is not established by the reviewed sources. The CISA KEV catalog did not list CVE-2026-22865 as of 2026-11-23, and CISA states that its absence is not evidence that the CVE has not been exploited [2]. The advisory texts give no exploitation status or public proof-of-concept information [5]. The vendor's advisory describes the attack conceptually, but no source reports a specific intrusion or threat actor [4]. Confirmed exploitation, credible reporting, public proof of concept and theoretical exploitability are therefore all unestablished at present.

Detection and exposure assessment

The reviewed sources give no detection queries, indicators of compromise or log signatures [5]. Detection therefore relies on the version and configuration checks below.

  1. Inventory every project that uses Gradle and record the Gradle version from its wrapper file gradle/wrapper/gradle-wrapper.properties, which contains the distributionUrl line naming the version [1, 3].
  2. For each project that uses the wrapper, run ./gradlew --version from the project root. This is standard Gradle tooling and is read-only. Expected output includes a line reading Gradle followed by a version number. Compare that version against 8.14.4 and 9.3.0 [3, 4]. A version check shows exposure to the flaw, not that exploitation occurred.
  3. Review each build script and settings file for the list of declared repositories and their order. Identify repositories that are unused or outdated, as the vendor advises [4].
  4. Record whether dependency verification or repository content filtering is configured for each build [3, 4].

A build on a fixed version is not affected by this flaw, but the version check alone does not show whether earlier builds resolved malicious artifacts.

Remediation

Immediate mitigation: remove repository declarations that are unused or outdated so that fewer repositories can be reached after a failure [4]. Configure strict repository content filtering so that each dependency group is only resolved from the intended repository. The vendor says builds that rely on this are safe from these issues, and the GitHub advisory points to the Gradle 9.3.0 user guide for it [3, 4]. Enable dependency verification as the vendor recommends when upgrading is not possible [4].

Permanent fix: upgrade Gradle to 8.14.4 on the 8.x line or to 9.3.0 on the 9.x line. The vendor states that either version protects against the described problem and changes repository searching so that it stops when these errors occur [3, 4]. Update the wrapper version in gradle/wrapper/gradle-wrapper.properties, run ./gradlew --version to confirm the new version, then rebuild each project. Keep the previous wrapper version under version control so the upgrade can be rolled back. The sources do not describe the steps needed for a specific build environment, so the upgrade should be tested in a non-production build first.

After upgrading, confirm that the build still resolves its dependencies from the intended repositories, then review the dependency verification results.

Remediation checklist

  1. Inventory all Gradle projects and read the version in gradle/wrapper/gradle-wrapper.properties for each one [1, 3]
  2. Upgrade the Gradle wrapper to 8.14.4 on the 8.x line or to 9.3.0 on the 9.x line by updating the distributionUrl in gradle/wrapper/gradle-wrapper.properties [3, 4]
  3. After each upgrade, run ./gradlew --version from the project root and confirm the reported version is 8.14.4 or 9.3.0 or later [3, 4]
  4. Where upgrading is not possible, enable dependency verification in each affected build as the vendor recommends [4]
  5. Configure strict repository content filtering so each dependency group resolves only from its intended repository, following the Gradle 9.3.0 user guide the GitHub advisory references [3, 4]
  6. Remove repository declarations that are unused or outdated from every build script and settings file [4]
  7. Review the order of declared repositories in each build and confirm that no attacker-reachable repository follows a repository that can be disrupted [4]
  8. Rebuild affected projects after upgrading and confirm that resolved dependencies come from the intended repositories [4]
  9. Keep the previous wrapper version in version control so the upgrade can be rolled back if a build fails [4]

Evidence gaps

  • Exploitation in the wild: no source reports confirmed exploitation or credible reporting; confirm through threat intelligence feeds and CISA KEV updates after 2026-11-23 [2, 5]
  • Public proof-of-concept status: the advisory texts give none; confirm through public exploit repositories and vendor statements [5]
  • EPSS (Exploit Prediction Scoring System) score: not included in the pack; obtain it from the FIRST EPSS service for the CVE
  • Indicators of compromise, detection queries and log signatures: none in the sources; confirm with the vendor, GitHub advisory updates or incident reports [5]
  • Resolution of the CVE record range below 9.3.0 against the 8.14.4 fixed release: confirm with NVD or the CVE Numbering Authority which 8.x releases are affected [1, 3]
  • Reason for the different user interaction values in the CVSS 4.0 (UI:P) and CVSS 3.1 (UI:N) vectors: confirm with NVD analysis or the scorers [1]
  • Underlying code change in the fixed releases: the sources describe the behaviour change but not the implementation; confirm through the Gradle release notes or source commits [4]
  • Whether earlier builds resolved artifacts from an untrusted repository: this requires build logs and dependency resolution records from each environment, which the sources do not describe [4]

References

  1. CVE-2026-22865 record. NIST National Vulnerability Database (NVD), 2026-06-17. https://nvd.nist.gov/vuln/detail/CVE-2026-22865. Accessed 2026-11-23. CVE identity, NVD status and dates, CVSS 4.0 and 3.1 scores and vectors, CWE mappings, the CVE record vendor range, NVD CPE ranges, and the GitHub advisory reference
  2. Known Exploited Vulnerabilities Catalog. Cybersecurity and Infrastructure Security Agency (CISA), 2026-11-23. https://www.cisa.gov/known-exploited-vulnerabilities-catalog. Accessed 2026-11-23. CISA KEV status as of 2026-11-23 and the statement that absence from KEV is not evidence of no exploitation
  3. GHSA-mqwm-5m85-gmcv / CVE-2026-22865 — Gradle causes failure to disable repositories exposing builds to malicious artifacts. GitHub Security Advisory Database, 2026-11-23. https://github.com/advisories/GHSA-mqwm-5m85-gmcv. Accessed 2026-11-23. GitHub advisory identifier, publication dates, CVSS 4.0 score and vector, CWE mappings, affected and fixed package ranges, and mitigation references
  4. Vendor advisory page (github.com). github.com. https://github.com/gradle/gradle/security/advisories/GHSA-mqwm-5m85-gmcv. Accessed 2026-11-23. Vendor advisory description of repository ordering, fail-stop behaviour, earlier non-fatal exceptions, attack preconditions, fixed releases, and recommended mitigations
  5. Further facts from the advisories reviewed. github.com. https://github.com/gradle/gradle/security/advisories/GHSA-mqwm-5m85-gmcv. Accessed 2026-11-23. Absence of exploitation status, proof-of-concept information, indicators, detection queries and CVSS details in the advisory texts

Written with AI assistance from the 5 sources listed above, as of the research cut-off; each fact is cited to its source. Check the vendor's advisory before acting.

Severity breakdown

High · 8.6 CVSS 4.0 base score from the CNA (github.com)

An attacker without an account can exploit this over the network if a user views or visits something, but only under specific conditions.

Attack from
the network (remotely)
Attack complexity
high (only works under specific conditions)
Special conditions
only in some setups or conditions
Login needed
no
User action needed
yes, a user must view or visit something
Impact
high on confidentiality and integrity, none on availability
Impact on other systems
high on integrity, none on confidentiality and availability

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X · CVSS 3.1 7.4 from NVD: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N · CVSS 4.0 8.6 from 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:N

Weakness

  • CWE-494: Download of Code Without Integrity Check
  • CWE-829: Inclusion of Functionality from Untrusted Control Sphere

Affected and fixed versions

ProductAffected versionsFixed in
org.gradle:gradle-core (Maven)< 8.14.48.14.4
≥ 9.0.0, < 9.3.09.3.0
gradle< 9.3.0—

From the GitHub Advisory Database and the vendor's CVE record; confirm with the vendor advisory before relying on a version number.

References by type

Vendor advisories

Patches and fixed releases

Other references

Details from NVD (public domain), the GitHub Advisory Database (CC BY 4.0).

Details

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

Source: GHSA-mqwm-5m85-gmcv / CVE-2026-22865, GitHub Advisory Database, licensed CC BY 4.0.

Affected

  • maven:org.gradle:gradle-core

Frequently asked questions

What is CVE-2026-22865?

CVE-2026-22865 is a Gradle build-tool flaw classified as CWE-494 and CWE-829, in which Gradle keeps searching later repositories after an earlier one fails with certain transient errors, so a build can fetch dependencies from a repository that was not intended. Weakness type: Download of Code Without Integrity Check (CWE-494).

How severe is CVE-2026-22865?

CVE-2026-22865 has a CVSS 4.0 base score of 8.6 (high), from the CNA (github.com). An attacker without an account can exploit this over the network if a user views or visits something, but only under specific conditions.

Is CVE-2026-22865 being exploited?

Not as far as is known: CVE-2026-22865 is not in CISA's Known Exploited Vulnerabilities catalog as of November 30, 2026. EPSS estimates a 0.2% chance that it is exploited in the next 30 days.

Which versions are affected by CVE-2026-22865?

org.gradle:gradle-core (Maven) < 8.14.4 (fixed in 8.14.4); org.gradle:gradle-core (Maven) ≥ 9.0.0, < 9.3.0 (fixed in 9.3.0); gradle < 9.3.0.

How do I fix CVE-2026-22865?

Inventory all Gradle projects and read the version in gradle/wrapper/gradle-wrapper.properties for each one. Upgrade the Gradle wrapper to 8.14.4 on the 8.x line or to 9.3.0 on the 9.x line by updating the distributionUrl in gradle/wrapper/gradle-wrapper.properties. After each upgrade, run ./gradlew --version from the project root and confirm the reported version is 8.14.4 or 9.3.0 or later.

Timeline & sources

References

Related vulnerabilities & news