Skip to content
OpenAdvisories
High · 8.7 CVE-2026-134791 EUVD-2026-135189

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

Published Nov 25, 2026 · Updated Nov 25, 2026 · 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 products

VendorProductAffectedFixed
Symfony symfony/expression-language 7.2.0 – < 7.4.24, 8.0.0 – < 8.1.12 7.4.24
Symfony symfony/symfony 7.2.0 – < 7.4.24, 8.0.0 – < 8.1.12 7.4.24

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 symfony No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 symfony No fix yet —
Ubuntu 26.04 LTS symfony No fix yet —
Ubuntu 16.04 LTS symfony No fix yet —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS symfony No fix yet —
Ubuntu Pro 22.04 LTS symfony No fix yet —
Ubuntu Pro 20.04 LTS symfony No fix yet —
Ubuntu Pro 18.04 LTS symfony No fix yet —

References