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

Published Updated

Untrusted expressions with unclosed comments make Symfony's ExpressionLanguage lexer quadratic, letting attackers exhaust CPU in apps that lint or parse them.

CVSS score

High

8.7/10

CVSS 4.0 · Scored by Symfony Breakdown
Exploited in the wild
Not known
Not in CISA's KEV catalogue
Exploit code
None known
No public exploit found
Fix
None listed
No fixed version published
Attack path
Over the internet
No login, no user action

What is CVE-2026-134791?

CVE-2026-134791 is a high-severity denial of service vulnerability in symfony/expression-language, published on 25 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-407

How severe is CVE-2026-134791?

CVE-2026-134791 scores 8.7 out of 10 under CVSS 4.0, which is high severity. It was scored by Symfony.

Attack vector
Network
Attack complexity
Low
Attack requirements
None
Privileges required
None
User interaction
None
Confidentiality
None
Integrity
None
Availability
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

Which versions are affected by CVE-2026-134791?

An affected version is only exploitable if your software calls ExpressionSyntax. Many projects that include it are not exposed.

How do I fix CVE-2026-134791?

No fix has been published for CVE-2026-134791 yet. Limit exposure of the affected software until one is available.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-134791 being exploited?

There is no known exploitation of CVE-2026-134791 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2026-134791, GHSA-5vf6-gchv-cmcr, UBUNTU-CVE-2026-134791.

Is CVE-2026-134791 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free