CVE-2026-84997: react/http ChunkedDecoder Infinite Loop DoS
Sending a malformed chunked HTTP body to a ReactPHP server (or receiving one from a malicious server) traps the single-threaded PHP process in an infinite loop, pinning a CPU core and making the…
The problem
React\Http\Io\ChunkedDecoder::handleData() loops while the internal buffer is non-empty, assuming the buffer shrinks each pass. Two malformed inputs break that assumption and cause an infinite loop.
Because ReactPHP is single-threaded, one stalled loop freezes every client on the process. Both HttpServer (inbound request bodies) and Browser (outbound response bodies) are affected, so attackers can hit server and client paths.
Proof of concept
A working proof-of-concept for CVE-2026-84997 in react/http, with the exact payload below.
POST / HTTP/1.1
Host: x
Transfer-Encoding: chunked
0
abTrigger 1 (terminal-chunk trailer, shown in payload): after the zero-size terminal chunk, the decoder tries to skip trailer bytes by slicing the buffer at the next CRLF. With no CRLF present, strpos() returns false; PHP coerces false to 0 in substr(), so the buffer is never advanced.
Neither the error guard (requires non-zero chunk size) nor the wait guard (requires fewer than two bytes) can fire, so the loop re-enters with identical state indefinitely.
Trigger 2 (off-by-one after a completed chunk): send body 1\r\nA followed by exactly two non-CRLF bytes (e.g. 1\r\nAAB). Once the data chunk is consumed, the remaining two bytes slip between the error guard (strlen > 2) and the wait guard (strlen < 2), and nothing is consumed on the next iteration.
The patch (commit b6d4688) adds an explicit break or buffer-advance in both code paths so the loop exits instead of spinning.
The fix
Upgrade react/http to 1.11.1 (composer require react/http:^1.11.1). If an immediate upgrade is not possible, place a normalizing reverse proxy such as nginx in front of the application for the server direction; note this does not protect outbound Browser requests.
Reported by jsifuentes and raiFork.
Related research
- high · 7.5CVE-2026-59933CVE-2026-59933: PHPSpreadsheet OLE Sector-Chain Infinite Loop (DoS)
- high · 5.9CVE-2026-74907CVE-2026-74907: Grav CMS Unauthenticated Path Traversal via plugin-asset-map.php
- critical · 8.8CVE-2026-75827CVE-2026-75827: Grav CMS Arbitrary File Write via Blueprint error_log Injection
- high · 9.1CVE-2026-75837CVE-2026-75837: Grav Group Blueprint Missing Authorization Allows Privilege Escalation to Super-Admin