Update dependency react/http to ^1.11.1 [SECURITY] - #478
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
| datasource | package | from | to | | ---------- | ---------- | ------ | ------ | | packagist | react/http | 1.10.0 | 1.11.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.9.0→^1.11.1react/http: A malformed HTTP chunked body can lead to a denial-of-service and peg the CPU
CVE-2026-84997 / GHSA-x424-64qh-5j54
More information
Details
Summary
A malformed HTTP message using
Transfer-Encoding: chunkedcan driveReact\Http\Io\ChunkedDecoderinto 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.Both directions are affected.
ChunkedDecoderdecodes chunked request bodies forReact\Http\HttpServerand chunked response bodies forReact\Http\Browser, so a server can be attacked by a malicious client and a client can be attacked by a malicious or compromised server.Details
ChunkedDecoder::handleData()loopswhile ($this->buffer !== '')and relies on the buffer shrinking each iteration. Two states leave the buffer unchanged while the loop condition stays true.Terminal-chunk trailer. After the terminating
0chunk, any remaining buffer is treated as trailer data to skip:When the trailer holds no CRLF yet,
strpos()returnsfalse, PHP coerces that to0insubstr(), 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.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) > 2while 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.PoC
Run the example server from the
reactphp/reactphpREADME and send a malformed request. Note the missing trailing\r\n:The PHP process pegs at 100% CPU and stops answering legitimate requests. A body of
1\r\nAABtriggers the second state.The client side is reachable the same way: a
Browserrequest to a server that answers withTransfer-Encoding: chunkedand either malformed body shape hangs the client process.Impact
Denial of service. The affected process stops responding entirely and has to be killed.
Servers 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
Browserreach the remote server directly, so an application fetching attacker-influenced URLs is affected regardless of what sits in front of it.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
reactphp/http (react/http)
v1.11.1Compare Source
This is a SECURITY release for the 1.x series of ReactPHP's HTTP component.
Security fix: This release fixes a high severity security issue in ReactPHP's HTTP client and server components
that affects all versions between
v0.6.0andv1.11.0. All users are encouraged to upgrade immediately.(GHSA-x424-64qh-5j54 reported by @jsifuentes and @raiFork and fixed by @jsifuentes and @clue)
Security fix: This release fixes a high severity security issue in ReactPHP's HTTP client component
that affects all versions between
v1.0.0andv1.11.0. All users are encouraged to upgrade immediately.(GHSA-g4f2-2pf3-2pwj reported by @EQSTLab and fixed by @WyriHaximus)
Improve test suite PHP 8.4 and 8.5 compatibility.
(#546, #547 and #551 by @WyriHaximus)
v1.11.0Compare Source
Feature: Improve PHP 8.4+ support by avoiding implicitly nullable types.
(#537 by @clue)
Feature: Allow underscore character in Uri host.
(#524 by @lulhum)
Improve test suite to fix expected error code when ext-sockets is not enabled.
(#539 by @WyriHaximus)
Configuration
📅 Schedule: (in timezone UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.