{"id":"DHI-27ll-xg6z-z42z-3n3p","summary":"### Impact","details":"### Impact\r\n\r\nA **Gradle client** (the `gradle`/`gradlew` CLI or an IDE using the Tooling API) finds running **Gradle daemons** through a registry file, which records the address of each daemon and the secret token used to connect to it. By default the registry is in the Gradle user home, and the `org.gradle.daemon.registry.base` property changes its location. This advisory is about a vulnerability in how the client reads and uses this registry.\r\n\r\nThe `org.gradle.daemon.registry.base` property is honoured when it is set in a project's `gradle.properties`, so a project can make the client read a registry file that the project itself ships. The client trusts the content of that file:\r\n\r\n* it deserializes parts of the file with Java serialization;\r\n* it connects to any address listed in the file, including a remote host, although daemons only ever listen locally;\r\n* it sends its request to that address, including the client's environment variables and system properties for a build, and deserializes the replies, also with Java serialization.\r\n\r\nWhen the client is an IDE or another tool using the Tooling API, a crafted reply makes the client load and run code from a jar URL chosen by the attacker, with the privileges of the user.\r\n\r\nA project that sets `org.gradle.daemon.registry.base` is not a safe setup: the property makes the client use daemons, and send them its environment, through a file the project chooses, before any build logic runs. Like a project-set `systemProp.gradle.user.home`, it has to be checked before running Gradle on an untrusted project. Gradle did not document it as such, so users who relied on a validated Wrapper for commands that run no build logic, such as `gradle --status` and `gradle --stop`, or on a review of the build scripts before an IDE synchronizes the project, could run code that appears in none of the project's reviewable sources.\r\n\r\nUsers who open or inspect untrusted repositories, for example pull requests from forks, are the most at risk.\r\n\r\nThe attacker must get the user to clone the malicious repository, then run Gradle on it or open it in an IDE.\r\n\r\n### Patches\r\n\r\nThe fixed versions harden how the client reads and uses the daemon registry. They do not make a registry location set by a project safe.\r\n\r\nThe client no longer uses Java serialization to read the daemon registry. It accepts only the address types Gradle itself writes, and fails on anything else. It also connects only to addresses of the local machine and skips any other address listed in the registry. Together with the mutual authentication of the connection that fixes [GHSA-pcp8-98xm-c6pr](https://github.com/gradle/gradle/security/advisories/GHSA-pcp8-98xm-c6pr), this means a local process that is not a Gradle daemon no longer receives the client's request.\r\n\r\n`org.gradle.daemon.registry.base` is still honoured in a project's `gradle.properties`, and a local process holding a token from a registry the project ships still receives the client's request. Check for this property before running Gradle on an untrusted project, also with a fixed version, as described under Workarounds.\r\n\r\n| Fix version | Availability |\r\n| ---------- | ----------- |\r\n| 9.9.1 | OSS |\r\n| 9.8.3 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n| 9.7.3 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n| 9.6.3 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n| 9.5.3 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n| 9.4.3 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n| 9.3.3 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n| 9.2.3 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n| 8.14.7 | OSS |\r\n| 7.6.8 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n\r\n### Workarounds\r\n\r\nUpgrading Gradle reduces the impact, but does not make a project that sets `org.gradle.daemon.registry.base` safe. With any Gradle version, before running any Gradle command on an untrusted repository or opening it in an IDE:\r\n\r\n* **Check the project's `gradle.properties` for `org.gradle.daemon.registry.base`.** A project has no reason to set it; do not run Gradle on a project that does.\r\n* **Check that no daemon registry is committed.** `git ls-files | grep 'registry.bin$'` lists committed registry files.\r\n\r\n### Forensics\r\n\r\nA repository that exploits this vulnerability sets `org.gradle.daemon.registry.base` in `gradle.properties` and contains a `registry.bin` file. To check a repository's history, including removed files:\r\n\r\n    git log --all -p -- '*gradle.properties' | grep 'org.gradle.daemon.registry.base'\r\n    git log --all --name-only --format= | grep 'registry.bin$'\r\n\r\nA fixed version reports a crafted registry instead of using it:\r\n\r\n* An entry with an address type Gradle does not write fails the command with `Could not read cache value from '\u003cpath\u003e/registry.bin'.`, caused by `Unexpected address type \u003cn\u003e in the daemon registry.`\r\n* An entry with an address of another machine is skipped. With `--info`, the client logs `Removing daemon from the registry due to communication failure. Daemon information: …`. With `--debug`, it also logs `Address \u003caddress\u003e is not an address of this machine, skipping.`\r\n\r\n\u003e [!IMPORTANT]\r\n\u003e The lack of such files in a repository cannot be used to conclude no such attack was performed. Their presence is not a confirmation that an attack happened, but an indication that more investigations are needed.\r\n\r\n### References\r\n\r\n* [Deserialization of untrusted Java objects before authentication in the client - daemon communication](https://github.com/gradle/gradle/security/advisories/GHSA-xwqc-3h47-hg64)\r\n* [Daemon client trusts stale registry entries (port squatting)](https://github.com/gradle/gradle/security/advisories/GHSA-pcp8-98xm-c6pr)\r\n* [Gradle architecture standard ADR-0002](https://github.com/gradle/gradle/blob/master/architecture/standards/0002-avoid-using-java-serialization.md), \"Avoid using Java serialization\" — Gradle's own guidance to move off Java serialization, citing deserialization security among the reasons.\r\n* [JEP 290: Filter Incoming Serialization Data](https://openjdk.org/jeps/290)\r\n\r\nMore about this type of vulnerabilities:\r\n\r\n* https://cwe.mitre.org/data/definitions/502.html\r\n* https://cwe.mitre.org/data/definitions/941.html","modified":"2026-11-28T06:30:07.061673053Z","published":"2026-11-20T04:19:04Z","upstream":["GHSA-gqrr-4j89-5267"],"database_specific":{"coverage":"partial","coverage_exclusions":["legacy_package_image_owner"]},"references":[{"type":"ADVISORY","url":"https://scout.docker.com/v/DHI-27ll-xg6z-z42z-3n3p"},{"type":"ADVISORY","url":"https://github.com/gradle/gradle/security/advisories/GHSA-gqrr-4j89-5267"}],"affected":[{"package":{"name":"gradle-8","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/gradle-8"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"8.14.7-r0"}]}],"versions":["8.14.4-r0","8.14.4-r1","8.14.4-r2","8.14.4-r3","8.14.5-r3","8.14.5-r4","8.14.5-r5","8.14.5-r6","8.14.5-r7","8.14.5-r8","8.14.5-r9","8.14.6-r0","8.14.6-r1","8.14.6-r2"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-27ll-xg6z-z42z-3n3p.json"}},{"package":{"name":"gradle-9","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/gradle-9"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.9.1-r0"}]}],"versions":["9.4.0-r0","9.4.0-r1","9.4.1-r1","9.4.1-r2","9.5.0-r2","9.5.0-r3","9.5.1-r3","9.6.0-r3","9.6.1-r3","9.6.1-r4","9.6.1-r5","9.6.1-r6","9.7.0-r1","9.7.1-r0","9.7.1-r1","9.8.0-r1","9.8.1-r0","9.8.2-r0","9.8.2-r1","9.9.0-r0"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-27ll-xg6z-z42z-3n3p.json"}},{"package":{"name":"wiremock","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/wiremock"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.13.2-r0"}]}],"versions":["3.13.2-r0","3.13.2-r1","3.13.2-r10","3.13.2-r11","3.13.2-r12","3.13.2-r13","3.13.2-r14","3.13.2-r15","3.13.2-r16","3.13.2-r17","3.13.2-r18","3.13.2-r19","3.13.2-r2","3.13.2-r20","3.13.2-r21","3.13.2-r22","3.13.2-r23","3.13.2-r24","3.13.2-r25","3.13.2-r26","3.13.2-r27","3.13.2-r28","3.13.2-r29","3.13.2-r3","3.13.2-r30","3.13.2-r31","3.13.2-r32","3.13.2-r33","3.13.2-r34","3.13.2-r35","3.13.2-r36","3.13.2-r37","3.13.2-r38","3.13.2-r39","3.13.2-r4","3.13.2-r40","3.13.2-r41","3.13.2-r42","3.13.2-r5","3.13.2-r6","3.13.2-r7","3.13.2-r8","3.13.2-r9"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-27ll-xg6z-z42z-3n3p.json"}},{"package":{"name":"wiremock","ecosystem":"Docker Hardened Images:Alpine:3.24","purl":"pkg:apk/dhi/wiremock"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.13.2-r0"}]}],"versions":["3.13.2-r0","3.13.2-r1","3.13.2-r10","3.13.2-r11","3.13.2-r12","3.13.2-r13","3.13.2-r14","3.13.2-r15","3.13.2-r16","3.13.2-r17","3.13.2-r18","3.13.2-r19","3.13.2-r2","3.13.2-r20","3.13.2-r21","3.13.2-r22","3.13.2-r23","3.13.2-r24","3.13.2-r25","3.13.2-r26","3.13.2-r27","3.13.2-r28","3.13.2-r29","3.13.2-r3","3.13.2-r30","3.13.2-r31","3.13.2-r32","3.13.2-r33","3.13.2-r34","3.13.2-r35","3.13.2-r36","3.13.2-r37","3.13.2-r38","3.13.2-r39","3.13.2-r4","3.13.2-r40","3.13.2-r41","3.13.2-r42","3.13.2-r5","3.13.2-r6","3.13.2-r7","3.13.2-r8","3.13.2-r9"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-27ll-xg6z-z42z-3n3p.json"}},{"package":{"name":"wiremock-gui","ecosystem":"Docker Hardened Images:Debian:13","purl":"pkg:deb/dhi/wiremock-gui"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.13.191-0"}]}],"versions":["3.13.191-0","3.13.192-0","3.13.193-0","3.13.193-1","3.13.193-2","3.13.194-0","3.13.195-0","3.13.195-1","3.13.195-2","3.13.195-3","3.13.195-4","3.13.195-5","3.13.195-6","3.13.195-7","3.13.197-0","3.13.197-1","3.13.197-2","3.13.197-3","3.13.198-0","3.13.198-1","3.13.198-2","3.13.198-3","3.13.198-4","3.13.199-1","3.13.199-2","3.13.199-3","3.13.199-4","3.13.199-5","3.13.199-6","3.13.199-7","3.13.199-8","3.13.208-0","3.13.211-0","3.13.212-0","3.13.213-0","3.13.214-0","3.13.215-0","3.13.216-0","3.13.217-0","3.13.217-1","3.13.217-2","3.13.217-3","3.13.217-4"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-27ll-xg6z-z42z-3n3p.json"}},{"package":{"name":"wiremock","ecosystem":"Docker Hardened Images:Debian:13","purl":"pkg:deb/dhi/wiremock"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.13.2-0"}]}],"versions":["3.13.2-0","3.13.2-1","3.13.2-10","3.13.2-11","3.13.2-12","3.13.2-13","3.13.2-14","3.13.2-15","3.13.2-16","3.13.2-17","3.13.2-18","3.13.2-19","3.13.2-2","3.13.2-20","3.13.2-21","3.13.2-22","3.13.2-23","3.13.2-24","3.13.2-25","3.13.2-26","3.13.2-27","3.13.2-28","3.13.2-29","3.13.2-3","3.13.2-30","3.13.2-31","3.13.2-32","3.13.2-33","3.13.2-34","3.13.2-35","3.13.2-36","3.13.2-37","3.13.2-38","3.13.2-39","3.13.2-4","3.13.2-40","3.13.2-41","3.13.2-42","3.13.2-5","3.13.2-6","3.13.2-7","3.13.2-8","3.13.2-9"],"database_specific":{"source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-27ll-xg6z-z42z-3n3p.json","owner_kind":"HSP"}}],"schema_version":"1.9.2"}