{"id":"CVE-2026-22865","aliases":["CVE-2026-22865","GHSA-mqwm-5m85-gmcv","BIT-GRADLE-2026-22865"],"related":[],"kind":"vulnerability","state":"published","title":"Gradle's failure to disable repositories failing to answer can expose builds to malicious artifacts","summary":"Gradle is a build automation tool, and its native-platform tool provides Java bindings for native APIs. When resolving dependencies in versions before 9.3.0, 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. 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. Gradle has introduced a change in behavior in Gradle 9.3.0 to stop searching other repositories when encountering these errors.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Gradle is a build automation tool, and its native-platform tool provides Java bindings for native APIs. When resolving dependencies in versions before 9.3.0, 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. 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. Gradle has introduced a change in behavior in Gradle 9.3.0 to stop searching other repositories when encountering these errors.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nWhen 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. \n\nIn 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. \n\n#### Vulnerability caused by continuing after max retries on transient errors\n\nAn 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. \n\nThis 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.\n\n### Patches\n\nGradle has introduced a change in behavior in Gradle 9.3.0 and 8.14.4 to stop searching other repositories when encountering these errors. \n\nUpgrading to either version will protect you against the vulnerabilities described here.\n\n### Workarounds\n\nIf 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.\n\nIf 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.\n\nYou should also review which repositories your builds use to check for unused or outdated repository declarations. \n\n### Related\n* [Security feature of failing fast on bad repos does not seem to be implemented](https://github.com/gradle/gradle/issues/35927)\n* [Repository disabling](https://docs.gradle.org/current/userguide/graph_resolution.html#sec:repository-disabling)\n* [Advisory about repositories with unknown host](https://github.com/gradle/gradle/security/advisories/GHSA-w78c-w6vf-rw82)","format":"markdown","source":"ghsa"},{"lang":"es","text":"Gradle es una herramienta de automatización de compilación, y su herramienta de plataforma nativa proporciona enlaces Java para APIs nativas. Al resolver dependencias en versiones anteriores a la 9.3.0, algunas excepciones no se trataban como errores fatales y no causarían la deshabilitación de un repositorio. Si una compilación encontraba una de estas excepciones, Gradle continuaría con el siguiente repositorio de la lista y potencialmente resolvería dependencias de un repositorio diferente. Una excepción como NoHttpResponseException puede indicar errores transitorios. Si los errores persisten después de un número máximo de reintentos, Gradle continuaría con el siguiente repositorio. Este comportamiento podría permitir a un atacante interrumpir el servicio de un repositorio y aprovechar otro repositorio para servir artefactos maliciosos. Este ataque requiere que el atacante tenga control sobre un repositorio después del repositorio interrumpido. Gradle ha introducido un cambio de comportamiento en Gradle 9.3.0 para dejar de buscar en otros repositorios al encontrar estos errores.","source":"nvd"}],"published":"2026-01-16T22:46:19.741Z","modified":"2026-11-23T16:00:04.252Z","severity":{"scorer":"GitHub_M","scheme":"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","score":8.6,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"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","score":8.6,"rating":"HIGH"},{"scorer":"GitHub","scheme":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-494","CWE-829"],"affected":[{"ranges":[{"version":"< 9.3.0","status":"affected"}],"vendor":"gradle","product":"gradle","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"8.14.4"}],"ecosystem":"Maven","package":"org.gradle:gradle-core","purl":"pkg:maven/org.gradle/gradle-core","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"9.0.0","status":"affected","fixed":"9.3.0"}],"ecosystem":"Maven","package":"org.gradle:gradle-core","purl":"pkg:maven/org.gradle/gradle-core","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"8.14.4"},{"status":"affected","introduced":"9.0.0","fixed":"9.3.0"}],"vendor":"gradle","product":"gradle","cpe":"cpe:2.3:a:gradle:gradle:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"9.3.0"}],"ecosystem":"Bitnami","package":"gradle","purl":"pkg:bitnami/gradle","source":"bitnami"}],"references":[{"url":"https://github.com/gradle/gradle/security/advisories/GHSA-mqwm-5m85-gmcv","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22865","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/gradle/gradle/commit/d38bfc0f1d4dabd38b305a67489bb8a6645138a1","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/gradle/gradle/commit/fa96c8bc7f7741e5dfa1da002c559afca3fa1fc1","tags":["web"],"sources":["ghsa"]},{"url":"https://docs.gradle.org/8.14.4/release-notes.html","tags":["web"],"sources":["ghsa"]},{"url":"https://docs.gradle.org/9.3.0/release-notes.html","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/gradle/gradle","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/gradle/gradle/releases/tag/v8.14.4","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/gradle/gradle/releases/tag/v9.3.0","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-01-20T14:47:11.391Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-22865","url":"https://www.cve.org/CVERecord?id=CVE-2026-22865","licence":"CVE Terms of Use","modified":"2026-01-20T14:47:41.205Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mqwm-5m85-gmcv","url":"https://github.com/advisories/GHSA-mqwm-5m85-gmcv","licence":"CC-BY-4.0","modified":"2026-11-23T16:00:04.252Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-22865","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22865","licence":"Public domain","modified":"2026-06-17T10:20:31.813Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-GRADLE-2026-22865","url":"https://osv.dev/vulnerability/BIT-GRADLE-2026-22865","licence":"Apache-2.0","modified":"2026-09-08T08:47:50.384Z"}],"updatedAt":"2026-11-25T22:59:12.904Z","epss":{"score":0.00213,"percentile":0.06576,"date":"2026-11-30T12:00:22.000Z"}}