DHI-7c6o-oqcs-iw4l-t2bl

Source
https://scout.docker.com/v/DHI-7c6o-oqcs-iw4l-t2bl
Import Source
https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-7c6o-oqcs-iw4l-t2bl.json
JSON Data
https://api.osv.dev/v1/vulns/DHI-7c6o-oqcs-iw4l-t2bl
Upstream
  • GHSA-pcp8-98xm-c6pr
Published
2026-11-20T04:19:04Z
Modified
2026-11-30T00:30:03Z
Summary
### Impact
Details

Impact

A Gradle client (the gradle/gradlew CLI or an IDE using the Tooling API) looks up running Gradle daemons in a registry file under the Gradle user home, then connects to an idle daemon over a loopback TCP connection and sends it the build to run. The client authenticates itself to the daemon with a secret token, but the daemon is not authenticated to the client, and the client does not check that the daemon process recorded in the registry is still running. This advisory is about a vulnerability on this communication channel.

When a daemon terminates without removing itself from the registry, for example when it is killed with kill -9, stopped by the out-of-memory killer or crashes, its loopback port becomes free while the registry still points to it. Another local user who binds that port receives the next build request from the victim's client. That request contains the client's environment variables, system properties and standard input, which commonly hold credentials and CI tokens. The attacker can then answer with crafted messages that the client deserializes:

  • in an IDE or any other Tooling API client, a crafted reply makes the client process load and run code from a jar chosen by the attacker;
  • on the command line, deserializing a hostile object graph can lead to code execution in the client, depending on the classes available, or to a denial of service.

Code execution in the client runs with the privileges of the user running the build. This has been demonstrated with a proof-of-concept. 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 a daemon to have terminated abnormally, leaving a stale entry in the registry, and the attacker to listen on that daemon's port when the victim next starts a build or synchronizes a project in an IDE.

This vulnerability is not exploitable from a remote network connection.

Patches

The client and the daemon now authenticate each other as soon as a connection opens, before any message is exchanged. The connection token in the registry holds two secrets. The client proves it holds the first one, and only then does the daemon answer with the second. The client checks that answer before it sends anything else. A process listening on the port of a terminated daemon cannot produce the daemon's secret. The client therefore drops the connection, removes the stale entry from the registry, and uses or starts another daemon. That process only receives the client's half of the token of a daemon that no longer exists.

The fix depends on the Gradle version used by the build, not on the Tooling API version of the IDE.

Fix version Availability
9.9.1 OSS
9.8.3 Gradle Security Subscription
9.7.3 Gradle Security Subscription
9.6.3 Gradle Security Subscription
9.5.3 Gradle Security Subscription
9.4.3 Gradle Security Subscription
9.3.3 Gradle Security Subscription
9.2.3 Gradle Security Subscription
8.14.7 OSS
7.6.8 Gradle 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 where Gradle builds run. 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.
  • Clear the daemon registry after a daemon terminated abnormally, before the next build. Delete <Gradle user home>/daemon/<Gradle version>/registry.bin. This is safe while daemons are running. Clients no longer find the running daemons and start new ones, and the unregistered daemons stop after their idle timeout (3 hours by default). On an affected version, do not use gradle --status or gradle --stop for this: both connect to every daemon in the registry, including stale entries.

If you cannot apply these mitigations, restrict which users and processes share a host with your builds until you can upgrade.

Forensics

Gradle's output does not tell a process squatting a daemon's port apart from a daemon whose port is free. Look for the conditions of the attack on the build host instead:

  • A daemon that terminated abnormally leaves a log file, <Gradle user home>/daemon/<Gradle version>/daemon-<pid>.out.log, that does not end with Daemon vm is shutting down... even though process <pid> is no longer running. Its port is on the line Daemon starting at: …, with address: [… port:<port>, …].
  • A process of another user listening on that port indicates an attempt. On Linux and macOS: lsof -nP -iTCP:<port> -sTCP:LISTEN.

[!IMPORTANT] These checks reveal the conditions for the attack, not the attack itself: by default, Gradle does not record which process a client sent its request to. Daemons also terminate abnormally for ordinary reasons, such as the out-of-memory killer, a crash or a machine reboot, so a log file without a shutdown line is not evidence of an attack. A squatting process only shows while it is still listening, and Gradle deletes daemon log files after 14 days by default, so finding neither does not rule out an attack.

References

More about this type of vulnerabilities:

Database specific
{
    "coverage":  "partial",
    "coverage_exclusions":  [
        "legacy_package_image_owner"
    ]
}
References

Affected packages

Docker Hardened Images:Alpine:3.23
gradle-8

Package

Name
gradle-8
Purl
pkg:apk/dhi/gradle-8

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
8.14.7-r0

Affected versions

8.*
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-7c6o-oqcs-iw4l-t2bl.json"
gradle-9

Package

Name
gradle-9
Purl
pkg:apk/dhi/gradle-9

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
9.9.1-r0

Affected versions

9.*
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-7c6o-oqcs-iw4l-t2bl.json"
wiremock

Package

Name
wiremock
Purl
pkg:apk/dhi/wiremock

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.13.2-r0

Affected versions

3.*
3.13.2-r0
3.13.2-r1
3.13.2-r2
3.13.2-r3
3.13.2-r4
3.13.2-r5
3.13.2-r6
3.13.2-r7
3.13.2-r8
3.13.2-r9
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-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-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-r40
3.13.2-r41
3.13.2-r42

Database specific

owner_kind
"HSP"
source
"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-7c6o-oqcs-iw4l-t2bl.json"
Docker Hardened Images:Alpine:3.24
wiremock

Package

Name
wiremock
Purl
pkg:apk/dhi/wiremock

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.13.2-r0

Affected versions

3.*
3.13.2-r0
3.13.2-r1
3.13.2-r2
3.13.2-r3
3.13.2-r4
3.13.2-r5
3.13.2-r6
3.13.2-r7
3.13.2-r8
3.13.2-r9
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-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-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-r40
3.13.2-r41
3.13.2-r42

Database specific

owner_kind
"HSP"
source
"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-7c6o-oqcs-iw4l-t2bl.json"
Docker Hardened Images:Debian:13
wiremock-gui

Package

Name
wiremock-gui
Purl
pkg:deb/dhi/wiremock-gui

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.13.191-0

Affected versions

3.*
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-7c6o-oqcs-iw4l-t2bl.json"
wiremock

Package

Name
wiremock
Purl
pkg:deb/dhi/wiremock

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.13.2-0

Affected versions

3.*
3.13.2-0
3.13.2-1
3.13.2-2
3.13.2-3
3.13.2-4
3.13.2-5
3.13.2-6
3.13.2-7
3.13.2-8
3.13.2-9
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-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-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-40
3.13.2-41
3.13.2-42

Database specific

owner_kind
"HSP"
source
"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-7c6o-oqcs-iw4l-t2bl.json"