← VULNERABILITIES

CVE-2026-134791

Unclosed Comments Make the Lexer of ExpressionLanguage Quadratic, Letting Untrusted Expressions Hold a Process

High · 8.7Fix available
CVSS
8.7
EPSS
0.64% (p45)
Published
2026-11-25
Age
4d old
Modified
2026-11-26
Product
Symfony symfony/expression-language
Aliases
GHSA-5vf6-gchv-cmcr

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Description

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.

Fixed in

7.4.24 · 8.1.12

Affected packages

EcosystemPackageRangeFixed
unknownsymfony/expression-language>=7.2.0, <7.4.247.4.24
unknownsymfony/expression-language>=8.0.0, <8.1.128.1.12
unknownsymfony/symfony>=7.2.0, <7.4.247.4.24
unknownsymfony/symfony>=8.0.0, <8.1.128.1.12

Sources

  • NVD · first seen 4d ago · NVD terms of use
  • OSV · first seen 4d ago · CC-BY 4.0
  • CVE List · first seen 4d ago · CVE Terms of Use

References

JSON