{"id":"CVE-2026-84997","aliases":["CVE-2026-84997","GHSA-x424-64qh-5j54"],"related":[],"kind":"vulnerability","state":"published","title":"react/http: A malformed HTTP chunked body can lead to a denial-of-service and peg the CPU","summary":"react/http is an event-driven, streaming HTTP client and server implementation for ReactPHP. From 0.6.0 until 1.11.1, React\\Http\\Io\\ChunkedDecoder could enter an infinite loop while processing a malformed Transfer-Encoding: chunked body because handleData required its buffer to shrink on every iteration. An incomplete terminal-chunk trailer without CRLF left the buffer unchanged after strpos returned false, and exactly two non-CRLF bytes after a completed non-terminal chunk bypassed both the error and wait guards. The affected decoder processes request bodies for React\\Http\\HttpServer and response bodies for React\\Http\\Browser, allowing a malicious client to freeze a server or a malicious or compromised server to freeze a client. A reverse proxy that normalizes inbound requests may protect the server direction but does not protect outbound Browser requests. This issue is fixed in version 1.11.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"react/http is an event-driven, streaming HTTP client and server implementation for ReactPHP. From 0.6.0 until 1.11.1, React\\Http\\Io\\ChunkedDecoder could enter an infinite loop while processing a malformed Transfer-Encoding: chunked body because handleData required its buffer to shrink on every iteration. An incomplete terminal-chunk trailer without CRLF left the buffer unchanged after strpos returned false, and exactly two non-CRLF bytes after a completed non-terminal chunk bypassed both the error and wait guards. The affected decoder processes request bodies for React\\Http\\HttpServer and response bodies for React\\Http\\Browser, allowing a malicious client to freeze a server or a malicious or compromised server to freeze a client. A reverse proxy that normalizes inbound requests may protect the server direction but does not protect outbound Browser requests. This issue is fixed in version 1.11.1.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nA malformed HTTP message using `Transfer-Encoding: chunked` can drive `React\\Http\\Io\\ChunkedDecoder` into an infinite loop, pegging a CPU core and freezing the event loop. Because ReactPHP is single-threaded, one such message stalls the entire process for every client until it is killed.\n\nBoth directions are affected. `ChunkedDecoder` decodes chunked **request** bodies for `React\\Http\\HttpServer` and chunked **response** bodies for `React\\Http\\Browser`, so a server can be attacked by a malicious client and a client can be attacked by a malicious or compromised server.\n\n### Details\n\n`ChunkedDecoder::handleData()` loops `while ($this->buffer !== '')` and relies on the buffer shrinking each iteration. Two states leave the buffer unchanged while the loop condition stays true.\n\n**Terminal-chunk trailer.** After the terminating `0` chunk, any remaining buffer is treated as trailer data to skip:\n\n```php\n} elseif ($this->chunkSize === 0) {\n    $this->buffer = (string)\\substr($this->buffer, $positionCrlf);\n}\n```\n\nWhen the trailer holds no CRLF yet, `strpos()` returns `false`, PHP coerces that to `0` in `substr()`, and the buffer is never advanced. Neither the error guard (which requires a non-zero chunk size) nor the wait guard (which requires fewer than two bytes remaining) can fire, so the loop re-enters with identical state.\n\n**Off-by-one after a completed chunk.** Once a non-terminal chunk has been fully transferred, the \"chunk does not end with a CRLF\" error guard requires `strlen($this->buffer) > 2` while the wait guard requires `< 2`. Exactly two non-CRLF bytes slip past both, and because the chunk is already complete nothing is consumed on the next iteration.\n\n### PoC\n\nRun the example server from the `reactphp/reactphp` README and send a malformed request. Note the missing trailing `\\r\\n`:\n\n```\nPOST / HTTP/1.1\\r\\nHost: x\\r\\nTransfer-Encoding: chunked\\r\\n\\r\\n0\\r\\nab\n```\n\nThe PHP process pegs at 100% CPU and stops answering legitimate requests. A body of `1\\r\\nAAB` triggers the second state.\n\nThe client side is reachable the same way: a `Browser` request to a server that answers with `Transfer-Encoding: chunked` and either malformed body shape hangs the client process.\n\n### Impact\n\nDenial of service. The affected process stops responding entirely and has to be killed.\n\nServers behind a reverse proxy that parses and re-frames HTTP, such as a typical nginx setup, are not affected on the **server** side, because the proxy normalises the request before it reaches PHP. That mitigation does not extend to the **client** side: outbound requests made with `Browser` reach the remote server directly, so an application fetching attacker-influenced URLs is affected regardless of what sits in front of it.","format":"markdown","source":"ghsa"}],"published":"2026-09-16T14:07:52.948Z","modified":"2026-09-30T17:43:24.057Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-835"],"affected":[{"ranges":[{"version":">= 0.6.0, < 1.11.1","status":"affected"}],"vendor":"reactphp","product":"http","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0.6.0","status":"affected","fixed":"1.11.1"}],"ecosystem":"Packagist","package":"react/http","purl":"pkg:composer/react/http","source":"ghsa"}],"references":[{"url":"https://github.com/reactphp/http/security/advisories/GHSA-x424-64qh-5j54","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/reactphp/http/commit/b6d4688790adf3797071fcf88a3fc4225f30486a","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/reactphp/http/releases/tag/v1.11.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-84997","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/react/http/CVE-2026-84997.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/reactphp/http","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-09-16T14:46:36.400Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-84997","url":"https://www.cve.org/CVERecord?id=CVE-2026-84997","licence":"CVE Terms of Use","modified":"2026-09-16T14:46:47.220Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x424-64qh-5j54","url":"https://github.com/advisories/GHSA-x424-64qh-5j54","licence":"CC-BY-4.0","modified":"2026-09-17T20:45:06.589Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-84997","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-84997","licence":"Public domain","modified":"2026-09-30T17:43:24.057Z"}],"updatedAt":"2026-11-25T22:59:39.064Z","epss":{"score":0.00549,"percentile":0.47378,"date":"2026-12-01T12:00:22.000Z"}}