cve.bz

CVE-2026-134791 Unclosed Comments Make the Lexer of ExpressionLanguage Quadratic, Letting Untrusted Expressions Hold a Process

8.7 highFix available

High (8.7) in symfony.

On this page
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.

Severity

CVSS 4.0

8.7 high
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
CWE
CWE-407 Inefficient Algorithmic Complexity
Published
Assigned by
Symfony (CNA)
NVD analysis
Not in the NVD yet
Record from
the CVE List, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-134791 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-134791?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-134791?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-134791 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
symfony/expression-languagefrom 7.2.0 before 7.4.24
symfony/expression-languagefrom 8.0.0 before 8.1.12
symfony/symfonyfrom 7.2.0 before 7.4.24
symfony/symfonyfrom 8.0.0 before 8.1.12

References

Check your stackJSON