CVE-2026-108082
JSON

8.7high

Symfony: ReDoS in HeaderUtils::split() Reachable Through the Cache-Control Request Header

Severity
8.7high CVSS:4.0 by Checkmarx
Exploit likelihood
0.48% (higher than 43% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Checkmarx
Also known as
GHSA-r925-mgvr-h9cc

Description

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, preg_match_all() gives up at pcre.backtrack_limit 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 through v5.4.53, v6.0.0-BETA1 through v6.4.45, v7.0.0-BETA1 through v7.4.18, and v8.0.0-BETA1 through v8.1.6.

Affected

Product or packageVersionsReported by
symfony/http-foundationfrom v4.1.0-BETA1 before v5.4.54, from v6.0.0-BETA1 before v6.4.46, from v7.0.0-BETA1 before v7.4.19, from v8.0.0-BETA1 before v8.1.7CVE List
symfony/http-foundation (Packagist)from 6.0.1 before 6.4.46, from 7.0.0 before 7.4.19, from 8.0.0 before 8.1.7, from 4.1.0 before 5.4.54GitHub Advisory Database
symfony/symfony (Packagist)from 6.0.1 before 6.4.46, from 7.0.0 before 7.4.19, from 8.0.0 before 8.1.7, from 4.1.0 before 5.4.54GitHub Advisory Database

All scores

Checkmarx8.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Classification

CWE-1333

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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, preg_match_all() gives up at pcre.backtrack_limit 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 through v5.4.53, v6.0.0-BETA1 through v6.4.45, v7.0.0-BETA1 through v7.4.18, and v8.0.0-BETA1 through v8.1.6.

GitHub Advisory Database
Description

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, preg_match_all() gives up at pcre.backtrack_limit and split() returns an empty array, so every directive of the header is silently dropped.

Resolution

The pattern now consumes whitespace only when more of the value follows it, so a value can no longer end on whitespace, nothing has to be given back, and every quantifier is possessive. The first release of this fix broke splitting on a whitespace separator: HeaderUtils::split('foo bar', ' ') returned a single value in 6.4.46 to 6.4.47, 7.4.19 to 7.4.20 and 8.1.7 to 8.1.8. Whitespace characters used as separators are now left out of the whitespace branch, which 6.4.48, 7.4.21 and 8.1.9 contain.

The patches for this issue are available here for branch 5.4 (and forward-ported to 6.4, 7.4, 8.1 and 8.2).

Credits

Symfony would like to thank r3verii for reporting the issue and Nicolas Grekas for providing the fix.

Symfony would also like to thank Bruno Dias from Checkmarx for his help getting a CVE assigned.

References

https://github.com/symfony/symfony/pull/66048patch, web
https://github.com/symfony/symfony/pull/66491patch, web
https://github.com/symfony/symfony/security/advisories/GHSA-r925-mgvr-h9ccvendor-advisory, web
https://symfony.com/blog/cve-2026-108082-redos-in-headerutils-split-reachable-through-the-cache-control-request-headervendor-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2026-108082advisory
https://github.com/symfony/symfony/commit/343a1772ce6ac03e48b228d2d7168d19750e3f36web
https://github.com/symfony/symfony/commit/9ffa802e5d7e9fb8ba95eeefd27e863e83b1bacaweb
https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/http-foundation/CVE-2026-108082.yamlweb
https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-108082.yamlweb
https://github.com/symfony/symfonypackage
https://github.com/symfony/symfony/releases/tag/v5.4.54web
https://github.com/symfony/symfony/releases/tag/v6.4.48web

Sources

SourceRecordLicence
CVE ListCVE-2026-108082 changed 2026-10-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-r925-mgvr-h9cc changed 2026-10-27CC-BY-4.0
NVDCVE-2026-108082 changed 2026-10-16Public domain