
Ataques
CVE-2025-67635: Unauthenticated DoS in the Jenkins CLI full-duplex endpoint

Security analyst
Atualizado
12 de dez. de 2025
5 min
TL;DR:
Jenkins' plain CLI endpoint (
/cli?remoting=false) pairs two POST requests (download/upload) via a sharedSessionUUID and is reachable without Overall/Read.Two bugs stack: An unsynchronized
HashMapinCLIActiondrops one half of the session (race condition), and the CLI protocol wait loops (ServerSideImpl.run,FullDuplexHttpService.upload) have no timeout.Attackers can finish their HTTP calls in milliseconds yet strand Jetty threads for 15s (race window) or indefinitely (abandoned protocol), causing controller-wide asymmetric DoS.
Affects core ≤ 2.540 and LTS ≤ 2.528.2 (CWE-362/CWE-404, CVSS: 7.5). Fixed in 2.541 and 2.528.3 by using
ConcurrentHashMap, adding handshake timeouts, and closing streams on error.Mitigate now: Upgrade, or block the plain CLI endpoint from untrusted networks and capture thread dumps to confirm no threads sit in
CLIAction$ServerSideImpl.runorFullDuplexHttpService.upload/download.
What the endpoint does
The non-Remoting CLI builds a full-duplex channel from two HTTP POSTs:
Download side:
Side: download, opens/cli?remoting=false, server writes a byte and waits for the upload halfUpload side:
Side: upload, sameSessionUUID, provides the input stream
hudson.cli.CLIAction wires this to jenkins.util.FullDuplexHttpService, storing active sessions in a cross-request registry.
Root cause #1: Unsynced session registry (race condition)
CLIAction keeps the session map in a plain HashMap shared by all request threads:
FullDuplexHttpService.Response.generateResponse calls services.put(uuid, service) for the download side, and services.get(uuid) for the upload side. Because HashMap is not thread-safe, concurrent puts/gets under load can
return
nullfor a valid download side;drop entries during a resize;
leave download threads inside
FullDuplexHttpService.downloadwaiting up to 15s for an upload that already arrived.
The result: Every racy pair ties up a servlet thread for the full timeout while the attacker's sockets close immediately, causing an asymmetric DoS and violating the security requirement “Make critical logic flows thread safe”.
Root cause #2: Missing protocol timeouts (deterministic hang)
Even when the two halves pair correctly, the protocol handshake can deadlock because neither side times out:
If the client drops the connection before sending CLI frames, the download thread blocks in ServerSideImpl.run() and the upload thread blocks in upload() with no timeout, consuming two Jetty threads per attempt until the controller is exhausted.
Exploitation notes
Both vectors require only network reachability to /cli:
Scenario A (race condition): Fire overlapping download/upload pairs with slight jitter so the upload half occasionally sees
null. Threads pile up inFullDuplexHttpService.downloadfor ~15s each.Scenario B (abandonment): open both halves, let them pair, then close without sending CLI frames. Threads stay in
CLIAction$ServerSideImpl.runandFullDuplexHttpService.uploadindefinitely, no timing window needed.
Below are the exact PoCs shared with the Jenkins security team:
PoC: racecond_a.py (HashMap race, two downloads per UUID)
PoC: racecond_b.py (protocol abandonment, deterministic hang)
Evidence
Thread dump (Scenario B, Jenkins 2.516.2 test controller): Stuck in the exact call sites with no timeout:
Video evidence: End-to-end crash reproduction against a fresh controller:
On a vulnerable build, you will see dozens of request threads waiting in those call sites, and regular CLI calls start timing out.
Impact
Unauthenticated DoS: no Overall/Read required to hit
/cli?remoting=falseLow attacker cost: Sockets close immediately, the server holds the work (15s per race attempt, infinite for abandonment)
Controller-wide degradation: Servlet threads and I/O streams back up, other endpoints time out
Patch details
Core commit: efa1816
CLIActionnow stores sessions in aConcurrentHashMap, removing the racyHashMapdrops that powered the asymmetric DoS.ServerSideImpl.runandFullDuplexHttpService.uploadadoptedCONNECTION_TIMEOUT-bounded waits with 1s wake-ups and DEBUG logs, so abandoned handshakes unwind instead of parking threads.PlainCLIProtocolalways callsside.handleClose()in afinallyblock, ensuring both halves tear down even on read errors or runtime exceptions.Regression coverage landed in
Security3630Test(JUnit 5): it shrinks the CLI timeout for tests, exercises the previous race with concurrent CLI invocations, and asserts threads are released after truncated streams.Net effect: the CLI download/upload pairing now fails fast and frees Jetty threads instead of blocking indefinitely on missing counterparts.
The changes bring the full-duplex CLI path back into compliance with requirement “Make critical logic flows thread safe”.
CVE and advisory references
SECURITY-3630 was assigned CVE-2025-67635 (CVSS 3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H). See the CNA record on cve.org and the NIST entry on NVD for canonical metadata.
Jenkins' official write-up: Jenkins Security Advisory 2025-12-10: SECURITY-3630.
Fix and hardening
If you cannot upgrade immediately, do the following:
Disable or firewall the plain CLI endpoint, prefer the WebSocket CLI with proper auth.
Lower Jetty thread caps only as a last resort (does not remove the bug).
Monitor thread dumps for
CLIAction$ServerSideImpl.runandFullDuplexHttpService.upload/downloadwait states.
Indicators of compromise
Repeated
IOException: No download side found for <uuid>in logs.Thread dumps showing many
TIMED_WAITINGatFullDuplexHttpService.downloadorWAITINGatCLIAction$ServerSideImpl.run/FullDuplexHttpService.upload.Spikes in
/cli?remoting=falserequests lacking authentication headers.
Patch promptly. This is a cheap, network-reachable DoS path in default Jenkins deployments.
Get started with Fluid Attacks' PTaaS right now
Assine nossa newsletter
Mantenha-se atualizado sobre nossos próximos eventos e os últimos posts do blog, advisories e outros recursos interessantes.
Outros posts


















