{"id":"DHI-mhex-k6d4-bdq5-wpqc","summary":"### Impact","details":"### Impact\r\n\r\nA **Gradle client** (the `gradle`/`gradlew` CLI or an IDE using the Tooling API) connects to a long-lived **Gradle daemon** over a loopback TCP connection to send build commands. The daemon listens on this port for its entire lifetime. Most commands on that channel are typed and use a custom serializer but messages can request to use Java serialization. The daemon authenticates client commands with a secret token, but it deserializes the incoming message before it verifies that token. This advisory is about a vulnerability on this communication channel.\r\n\r\nAn attacker who can place bytes on this channel can cause the daemon to deserialize a hostile object graph which can lead to remote code execution in the daemon JVM or a denial of service (a crash or resource exhaustion from a malformed or deeply nested graph). This has been demonstrated with a proof-of-concept. Code execution in the daemon runs with the privileges of the user running the build and exposes in-memory and on-disk secrets available to it. This advisory does not publish the proof-of-concept.\r\n\r\nBuilds running on **shared / multi-user build hosts** are the most at risk. The vulnerability requires a Gradle daemon to be running and it does not need to be actively building. \r\n\r\nThis vulnerability is not exploitable from a remote network connection.\r\n\r\n### Patches\r\n\r\nGradle has updated the daemon protocol to verify the secret token before deserializing untrusted input.\r\n\r\n| Fix version | Availability |\r\n| ---------- | ----------- |\r\n| 9.8.1 | OSS |\r\n| 9.7.2 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n| 9.6.2 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n| 9.5.2 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n| 9.4.2 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n| 9.3.2 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n| 9.2.2 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n| 9.1.2 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n| 8.14.6 | OSS |\r\n| 7.6.7 | [Gradle Security Subscription](https://gradle.org/security-subscription/) |\r\n\r\n### Workarounds\r\n\r\nUpgrading Gradle is our recommended fix. \r\n\r\nIf you cannot upgrade immediately:\r\n\r\n* **Do not run builds on shared, multi-user machines.** Ensure only trusted users have local (same-host) access to a machine while a Gradle build/daemon is running. On CI, prefer single-tenant, ephemeral runners rather than shared hosts. The attacker must be a co-located local principal to gain access to the Gradle build.\r\n\r\nIf you cannot apply these mitigations, restrict which users and processes share a host with your builds until you can upgrade.\r\n\r\n### Forensics\r\n\r\nThe Gradle daemon logs at warning level any message it fails to process. See below for how the log line looks like, it would be usually followed by an exception and a stack trace:\r\n\r\n`Unable to receive command from client socket connection from /127.0.0.1:\u003cport\u003e to /127.0.0.1:\u003cport\u003e. Discarding connection.`\r\n\r\nIf a build was running during this connection attempt, this line will be visible in the build logs as well. If no build was running, then this line will only be visible in daemon logs, prefixed with a timestamp, log level and log origin, such as:\r\n\r\n`2026-01-01T12:00:00.000+0000 [WARN] [org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler]`\r\n\r\nDocumentation about daemon logs can be found [here](https://docs.gradle.org/current/userguide/gradle_daemon.html#sec:daemon_logs).\r\n\r\n\u003e [!IMPORTANT]\r\n\u003e The lack of a log entry cannot be used to conclude no such attack was performed. The presence of a log entry 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* [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* [Unauthenticated worker-to-daemon channel deserializes untrusted Java objects](https://github.com/gradle/gradle/security/advisories/GHSA-mvvg-497x-hmj8)\r\n\r\nMore about this type of vulnerabilities:\r\n\r\n* https://cwe.mitre.org/data/definitions/306.html\r\n* https://cwe.mitre.org/data/definitions/502.html","modified":"2026-11-26T20:45:09.585197542Z","published":"2026-11-20T04:19:04Z","upstream":["GHSA-xwqc-3h47-hg64"],"database_specific":{"coverage":"partial","coverage_exclusions":["legacy_package_image_owner"]},"references":[{"type":"ADVISORY","url":"https://scout.docker.com/v/DHI-mhex-k6d4-bdq5-wpqc"},{"type":"ADVISORY","url":"https://github.com/gradle/gradle/security/advisories/GHSA-xwqc-3h47-hg64"}],"affected":[{"package":{"name":"gradle-8","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/gradle-8"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"8.14.4-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","8.14.7-r0","8.14.8-r0"],"database_specific":{"source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-mhex-k6d4-bdq5-wpqc.json","owner_kind":"HSP"}},{"package":{"name":"gradle-9","ecosystem":"Docker Hardened Images:Alpine:3.23","purl":"pkg:apk/dhi/gradle-9"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"9.4.0-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","9.9.1-r0","9.9.2-r0"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-mhex-k6d4-bdq5-wpqc.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-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-mhex-k6d4-bdq5-wpqc.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-r5","3.13.2-r6","3.13.2-r7","3.13.2-r8","3.13.2-r9"],"database_specific":{"source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-mhex-k6d4-bdq5-wpqc.json","owner_kind":"HSP"}},{"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-mhex-k6d4-bdq5-wpqc.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-5","3.13.2-6","3.13.2-7","3.13.2-8","3.13.2-9"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-mhex-k6d4-bdq5-wpqc.json"}}],"schema_version":"1.9.2"}