Improper Error Handling in Gradle Build Automation Tool
CVE-2026-22816
What is CVE-2026-22816?
Gradle's native-platform tool, widely used for build automation, exhibits a vulnerability where it fails to properly handle exceptions during dependency resolution. In versions prior to 9.3.0, certain exceptions do not trigger fatal errors, allowing the build process to continue with potentially unsafe repositories. If a build references an unresolvable hostname due to a registration lapse or a typographical error, Gradle would still attempt to resolve dependencies from other listed repositories. This behavior can be exploited by attackers who register the domain name used by the build, enabling them to serve malicious artifacts. Gradle's subsequent update in version 9.3.0 addresses this issue by altering the error handling process to halt further repository searches upon encountering such exceptions.
Affected Version(s)
gradle < 9.3.0
