CVE-2026-108082: Symfony: ReDoS in HeaderUtils::split() Reachable Through the Cache-Control Request Header
Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Prior to versions 5.4.54, 6.4.46, 7.4.19, and 8.1.7, HeaderUtils::split() parsed header values with a pattern whose token alternative also matched whitespace, followed by a (?<!\s) lookbehind. A run of whitespace placed before a separator could be divided among the iterations of the enclosing repetition in exponentially many ways, and the engine tried all of them before settling. HeaderBag calls it for the Cache-Control header whenever a Request is built, so any application handling HTTP requests is reachable, with no authentication.
A single request carrying such a header costs close to a second of CPU (813 ms for a run of 17 spaces in an 8 KB header on PHP 8.5, doubling with each extra space). From 18 spaces on, pregmatchall() gives up at pcre.backtracklimit and split() returns an empty array, so every directive of the header is silently dropped.
This issue affects symfony/http-foundation v4.1.0-BETA1 prior to v5.4.54, v6.0.0-BETA1 prior to v6.4.46, v7.0.0-BETA1 prior to v7.4.19, and v8.0.0-BETA1 prior to v8.1.7.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
symfony/http-foundationto a version that resolves this vulnerability.Fixed in 5.4.54 - Upgrade
Upgrade
symfony/http-foundationto a version that resolves this vulnerability.Fixed in 6.4.46 - Upgrade
Upgrade
symfony/http-foundationto a version that resolves this vulnerability.Fixed in 7.4.19 - Upgrade
Upgrade
symfony/http-foundationto a version that resolves this vulnerability.Fixed in 8.1.7
Event History
Frequently Asked Questions
Which deployments are exposed to unauthenticated exploitation?
Any application using an affected symfony/http-foundation version that handles HTTP requests is reachable. HeaderBag processes the Cache-Control header when a Request is built, so an attacker does not need authentication.
What request content triggers the excessive CPU use?
A Cache-Control header containing a run of whitespace immediately before a separator triggers the problematic parsing behavior. In the described test, 17 spaces in an 8 KB header consumed about 813 ms of CPU on PHP 8.5, with cost doubling for each additional space.
Can this issue also alter Cache-Control processing rather than only consume CPU?
Yes. At 18 spaces or more, preg_match_all() reaches pcre.backtrack_limit and HeaderUtils::split() returns an empty array, silently dropping every Cache-Control directive in that header.
Which versions contain the fix?
Upgrade symfony/http-foundation to 5.4.54, 6.4.46, 7.4.19, or 8.1.7 or later in the corresponding release line. Affected ranges begin at 4.1.0-BETA1, 6.0.0-BETA1, 7.0.0-BETA1, and 8.0.0-BETA1 respectively.