Symfony ExpressionLanguageに脆弱性、閉じられていないコメントで処理が長時間止まるおそれ
Summary
Symfony ExpressionLanguageの字句解析に脆弱性があり、閉じられていないコメントを含む式を処理させると、処理に非常に長い時間がかかり、サービス停止を招くおそれがあります。影響するのはsymfony/expression-languageとsymfony/symfonyの7.2.0以降7.4.24未満、8.0.0以降8.1.12未満です。7.4.24または8.1.12以降に修正版が公開されているので、該当する版を使っている場合は更新してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
Symfony ExpressionLanguageの字句解析に脆弱性があり、閉じられていないコメントを含む式を処理させると、処理に非常に長い時間がかかり、サービス停止を招くおそれがあります。影響するのはsymfony/expression-languageとsymfony/symfonyの7.2.0以降7.4.24未満、8.0.0以降8.1.12未満です。7.4.24または8.1.12以降に修正版が公開されているので、該当する版を使っている場合は更新してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| Symfonysymfony/expression-language |
≥ 7.2.0, < 7.4.24→ 7.4.24 ≥ 8.0.0, < 8.1.12→ 8.1.12 |
7.4.24 8.1.12 |
| Symfonysymfony/symfony |
≥ 7.2.0, < 7.4.24→ 7.4.24 ≥ 8.0.0, < 8.1.12→ 8.1.12 |
7.4.24 8.1.12 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- Debian DEBIAN-CVE-2026-134791 symfony Fix available
Original description The description as published by the source.
Since Symfony 7.2, expressions can contain comments. The lexer used a regular expression to find the end of a comment. When a /* was never closed, this regular expression scanned the rest of the expression, and the lexer then went on with the next character. So each /* scanned the rest of the expression again. Linting 192 KB of /* took 9 to 11 seconds, and 96 KB took 34 seconds without PCRE JIT.
The lexer runs before the parser and its nesting limit. Any code that lints or parses untrusted expressions is affected, including the ExpressionSyntax validation constraint. A Length constraint on the same value doesn't help, since the validator runs both constraints.
The lexer now uses strpos() to find the end of a comment, and a comment that is never closed throws a SyntaxError. Such expressions were already invalid. Lexing takes linear time again.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory symfony.com
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- patch github.com
- web packagist.org