CVE-2026-134791
JSON

8.7high

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

Severity
8.7high CVSS:4.0 by Symfony
Exploit likelihood
0.64% (higher than 52% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Symfony

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.

Affected

Product or packageVersionsReported by
symfony/expression-languagefrom 7.2.0 before 7.4.24, from 8.0.0 before 8.1.12CVE List
symfony/symfonyfrom 7.2.0 before 7.4.24, from 8.0.0 before 8.1.12CVE List

Classification

CWE-407

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

References

Sources

SourceRecordLicence
CVE ListCVE-2026-134791 changed 2026-11-25CVE Terms of Use
NVDCVE-2026-134791 changed 2026-11-30Public domain