Repository navigation
Bump symfony/http-foundation from 8.1.0 to 8.1.10 - #1680
Closed
superbot-helper wants to merge 0 commit into
Closed
superbot-helper wants to merge 0 commit into
superbot-helper wants to merge 0 commit into
Conversation
javiereguiluz
force-pushed
the
security/bump-symfony-http-foundation-8.1.10
branch
from
November 6, 2026 09:26
a1419fd to
f42980c
Compare
Member
|
Thanks for this contribution. Sadly, the changes included here were part of other PR that was merged earlier. That's why GitHub closed it when merging it. Sorry! |
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.
Updates symfony/http-foundation from 8.1.0 to 8.1.10.
Fixes GHSA-r925-mgvr-h9cc — HeaderUtils::split() compiles a pattern whose token branch
[^",=]+also matches whitespace, so a run of whitespace before a separator can be divided among the iterations of the enclosing+in exponentially many ways and the trailing(?<!\s)assertion makes the engine try every one of them before it settles, while HeaderBag::set() runs that split on the Cache-Control header as a Request is built: one unauthenticatedGET /whose 15,200-byte Cache-Control header carries 800a+ 17 spaces +,runs held the application's own listener for a median 799.7 ms (748.6-1227.9 ms) against a median 25.1 ms (18.3-51.0 ms) for the same 15,200 bytes with 17xcharacters in place of each space run, a 7,999-byte version of the same pair cost a median 429.4 ms against 22.5 ms, and with 8.1.10 the crafted headers cost a median 19.9 ms and 22.8 ms, the same as their controls.What this changes:
composer.lock— composer.lock:4098: symfony/http-foundation v8.1.0 -> v8.1.10 (the only package entry that moves; composer.json is unchanged).How to verify:
Measured before and after, same request, same server
Both trees are this repository at
8d2e2ef7; the only difference iscomposer.lock, which movessymfony/http-foundationv8.1.0 to v8.1.10 (diff -r --exclude=vendorreports only composer.lock, and inside vendor only that package's version differs). Every row is one rawGET /to the application's ownphp -Slistener started from that tree's ownpublic/index.php, five samples per row, three runs per tree, alternating trees between runs.a+17 spaces+,runsxwhere each 17-space run wasThe control is byte-for-byte the same length and the same directive shape as the crafted header; the only difference is that each run of 17 spaces is 17
xcharacters, so no whitespace can be handed back. On the base tree the crafted row is about 32x its control and the control matches the baseline; with 8.1.10 the crafted row costs the same as its control. Every row returns 200 on both trees, so the fix removes work and does not change the route or the response.Absolute timings depend on machine load (the same rows moved by up to about 1.6x between runs); the ordering between the crafted row and its same-byte-count control does not.
Where the cost is
Request::createFromGlobals()(vendor/symfony/http-foundation/Request.php:328) builds aHeaderBagfrom the request headers (Request.php:310);HeaderBag::set()parses theCache-Controlheader on entry (HeaderBag.php:150-151) throughHeaderBag::parseCacheControl()(HeaderBag.php:267), which callsHeaderUtils::split($header, ',=')(HeaderUtils.php:45). That function compiles a pattern whose token branch[^",=]+also matches whitespace under a+repetition with a trailing(?<!\s)assertion (HeaderUtils.php:53-63), so a whitespace run in front of a separator can be divided among the iterations in exponentially many ways and the engine tries all of them before the assertion settles.The fix (8.1.7, with the whitespace-separator regression corrected in 8.1.9) makes the token branch consume whitespace only when more of the value follows and makes every quantifier possessive, so no character is given back. The advisory's own regression test splits
"a" . str_repeat(" ", 25) . ","repeated 200 times; this packet sends the same shape at 17 spaces per run, the largest run that stays under pcre.backtrack_limit (18 spaces exhausts it and the split silently returns nothing).Scope
composer.lock:symfony/http-foundationv8.1.0 -> v8.1.10, one package entry (source and dist references, release time).composer.jsonis unchanged because it already requiressymfony/framework-bundle: ^8, which allows the patched release; no application source, template, asset, config or test changes.The repository's other Symfony packages stay at v8.1.0; 8.1.10 satisfies framework-bundle v8.1.0's
symfony/http-foundation ^8.1constraint, andcomposer installfrom the patched lock resolves the whole tree with exit 0.What this does not claim
Only the 8.1.0 -> 8.1.10 move was measured. The advisory also covers 6.4.x below 6.4.46, 7.x below 7.4.19 and 5.4.x below 5.4.54; those branches were not measured here and this PR does not speak for them.
The measurements are single-request costs on one listener with five samples per row; the packet does not claim a concurrent-request or sustained-throughput number.
Absolute timings depend on machine load; only the ordering between a crafted row and its same-byte-count control is claimed.
Crafted and same-byte-count control Cache-Control headers were measured through the application's own listener on both trees, and the control isolates the whitespace-run cost.
Automated security patch from Superbot.