Symfonyに正規表現によるサービス妨害(ReDoS)の脆弱性(CVE-2026-108082)
概要
Symfonyに正規表現によるサービス妨害(ReDoS)の脆弱性が確認されました。
バージョン 6.0.1 以上 6.4.46 未満、7.0.0 以上 7.4.19 未満、8.0.0 以上 8.1.7 未満、4.1.0 以上 5.4.54 未満に影響があります。
修正版 6.4.46 / 7.4.19 / 8.1.7 / 5.4.54 への更新が推奨されます。
脆弱性の基本情報
| 脆弱性ID |
CVE-2026-108082 GHSA-r925-mgvr-h9cc |
|---|---|
| 脆弱性の種類 | 正規表現によるサービス妨害(ReDoS) |
| 危険度 | 高 |
| 公開日 | 2026年10月27日 |
影響を受ける製品
| 製品 | 影響を受けるバージョン | 修正版 | 出典 |
|---|---|---|---|
| Symfony |
6.0.1 以上 6.4.46 未満、7.0.0 以上 7.4.19 未満、8.0.0 以上 8.1.7 未満、4.1.0 以上 5.4.54 未満 | 6.4.46 / 7.4.19 / 8.1.7 / 5.4.54 | OSV.dev |
推奨対応
- Symfonyを、ご利用中の系列に対応する修正版(6.4.46 / 7.4.19 / 8.1.7 / 5.4.54)またはそれ以降の公式最新版へ更新してください。
情報元の原文
OSV.dev
Symfony: ReDoS in HeaderUtils::split() Reachable Through the Cache-Control Request Header
### 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](https://github.com/symfony/symfony/commit/343a1772ce6ac03e48b228d2d7168d19750e3f36) for branch 5.4 (and forward-ported to 6.4, 7.4, 8.1 and 8.2).
### Credits
Symfony would like to thank [r3verii](https://github.com/r3verii) for reporting the issue and Nicolas Grekas for providing the fix.
Symfony would also like to thank [Bruno Dias](https://github.com/cx-bruno-dias) from Checkmarx for his help getting a CVE assigned.
利用条件:CC BY 4.0
出典: GitHub Advisory Database(OSV.dev 経由で取得)。原文のまま掲載(改変なし)