CVE-2026-134791 in expression-languageinfo

Summary

by MITRE • 11/25/2026

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.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 11/25/2026

Symfony versions 7.2 through earlier releases contained a regular expression denial-of-service vulnerability within its Expression Language component. The issue stems from the lexer's method of identifying comment boundaries, specifically looking for closing delimiters in multi-line comments denoted by asterisks and slashes. When an input string contains an unclosed comment sequence, the underlying Perl Compatible Regular Expressions engine exhibits catastrophic backtracking behavior. This occurs because the regular expression attempts to match the end of the comment against every possible position within the remaining text when no valid closing delimiter is found. Consequently, the computational complexity escalates from linear time to exponential time relative to the length of the input string. In practical terms this manifests as severe performance degradation where linting a relatively small payload of approximately one hundred and ninety-two kilobytes consisting solely of unclosed comment markers can consume between nine and eleven seconds of CPU time. Without Just-In-Time compilation enabled by the PCRE library, even smaller payloads such as ninety-six kilobytes required thirty-four seconds to process effectively freezing application threads during validation operations.

This vulnerability impacts any code path that parses or validates untrusted user input using Symfony's Expression Language component before it reaches the parser layer which enforces nesting limits. The lexer operates independently of these structural safeguards allowing malicious actors to bypass depth restrictions by exploiting the lexical analysis phase rather than attempting to construct deeply nested valid expressions. Common attack vectors include forms utilizing the ExpressionSyntax validation constraint or any custom logic that evaluates dynamic expression strings derived from user input. Standard length-based constraints like those provided by Symfony's Length validator are ineffective against this specific threat because they operate on character count without assessing computational complexity and thus fail to prevent the execution of pathological regular expressions regardless of payload size limits imposed at the application layer.

The operational impact involves significant resource exhaustion leading to service unavailability for affected applications hosting vulnerable versions. Attackers can trigger high CPU utilization by submitting crafted payloads that force the lexer into infinite or near-infinite loops thereby denying legitimate users access to services dependent on expression evaluation functionality. This aligns with Common Weakness Enumeration category CWE-400 concerning unconstrained resource consumption and maps directly to MITRE ATT&CK technique T1496 which describes Resource Hijacking via denial-of-service attacks targeting computational resources rather than memory or network bandwidth exclusively.

The remediation strategy implemented in subsequent releases replaces the problematic regular expression approach with a deterministic string search function utilizing strpos for locating comment terminators. This change ensures that lexing operations maintain linear time complexity regardless of input structure since each character is examined at most once during the scanning process. Additionally unclosed comments now trigger immediate SyntaxError exceptions rather than allowing prolonged processing delays thereby providing both security and performance improvements. Organizations running affected Symfony versions must upgrade to patched releases immediately if they utilize expression language features with untrusted inputs while monitoring system metrics for signs of CPU saturation indicative of ongoing exploitation attempts in environments where patching cannot occur instantly.

Responsible

Symfony

Reservation

11/22/2026

Disclosure

11/25/2026

Moderation

accepted

CPE

ready

EPSS

0.00642

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!