PT-2026-162535

Published

2026-11-20

·

Updated

2026-11-20

Description by

Score
N/A
Not available

No severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.

Impact

Gradle runs work — compilation, tests, and Worker API actions — in forked worker processes that communicate with the long-lived Gradle daemon. The worker ↔ daemon socket is a loopback TCP connection that performs no authentication of the connecting peer. The connection is accepted on a first-come basis during a short window while a worker starts. Each message on that channel can be encoded with a per-type serializer but uses Java serialization as a fallback. This advisory is about a vulnerability on this communication channel.
An 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.
Builds running on shared / multi-user build hosts are the most at risk. The vulnerability requires an actively running Gradle build and requires the attacker to win a race to connect during the short window between a worker process starting and the daemon accepting a connection from it.
This vulnerability is not exploitable from a remote network connection.

Patches

Gradle has updated the worker/daemon protocol to use a per-connection secret for authentication.
Fix versionAvailability
9.8.1OSS
9.7.2Gradle Security Subscription
9.6.2Gradle Security Subscription
9.5.2Gradle Security Subscription
9.4.2Gradle Security Subscription
9.3.2Gradle Security Subscription
9.2.2Gradle Security Subscription
9.1.1Gradle Security Subscription
8.14.6OSS
7.6.7Gradle Security Subscription

Workarounds

Upgrading Gradle is our recommended fix.
If you cannot upgrade immediately:
  • 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.
If you cannot apply these mitigations, restrict which users and processes share a host with your builds until you can upgrade.

Forensics

When a message not originating from the worker takes over the connection, the worker process will fail its connection attempt and Gradle will report this error in the build output:
org.gradle.internal.remote.internal.ConnectException: Could not connect to server [<id> port:<port>, addresses:[/127.0.0.1]]. Tried addresses: [/127.0.0.1].
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:…)
	…
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:…)
Caused by: java.net.ConnectException: Connection refused
This error will then be reported as a failure of the task or operation that started the worker.
[!IMPORTANT] 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.

References

* Gradle architecture standard ADR-0002, "Avoid using Java serialization" — Gradle's own guidance to move off Java serialization, citing deserialization security among the reasons.
More about this type of vulnerabilities:
Vendors
Affected products
Related identifiers
DHI-ZZBG-URGU-AKM3-LPCJ
Found an issue in the description? Have something to add? Feel free to write us 👾