Read the docs

Unclosed comments make Symfony ExpressionLanguage lexer quadratic

Priority LOW 39CWE-407Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
None
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-407.

Summary

The symfony/expression-language and symfony/symfony packages from 7.2.0 before 7.4.24 and from 8.0.0 before 8.1.12 are affected. An unclosed /* comment makes the expression lexer rescan the rest of the expression at each comment start, which is CWE-407. A remote attacker who can submit expressions that are linted or parsed can tie up a process, with 192 KB of unclosed comments taking 9 to 11 seconds to lint.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

Description from the CNA

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.

Why it matters now

EPSS 0.00642 45th percentileScored 2026-11-30
Fix Fixed symfony/expression-language (Symfony): 7.4.24, 8.1.12symfony/symfony (Symfony): 7.4.24, 8.1.12

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
symfonysymfony/expression-language7.2.0 to before 7.4.24; 8.0.0 to before 8.1.127.4.24, 8.1.12Patch availableCNA
symfonysymfony/symfony7.2.0 to before 7.4.24; 8.0.0 to before 8.1.127.4.24, 8.1.12Patch availableCNA
  • symfony/expression-language Vendorsymfony Affected 7.2.0 to before 7.4.24; 8.0.0 to before 8.1.12 Fixed in 7.4.24, 8.1.12 Patch available CNA
  • symfony/symfony Vendorsymfony Affected 7.2.0 to before 7.4.24; 8.0.0 to before 8.1.12 Fixed in 7.4.24, 8.1.12 Patch available CNA

Remediation

The fixed versions are 7.4.24 and 8.1.12 for both symfony/expression-language and symfony/symfony. Upgrade to 7.4.24 on the 7.x line or to 8.1.12 on the 8.x line.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

  • Fix · CNA symfony/expression-language (Symfony) Fixed in 7.4.24, 8.1.12
  • Fix · CNA symfony/symfony (Symfony) Fixed in 7.4.24, 8.1.12

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    symfony/symfony 7.4.24, 8.1.12

    7 records Highest priority Priority LOW 7 LOW

    Other records, highest priority first

    • TI-2026-98139 Symfony Mailer require_tls check is skipped on HELO fallbackPriority LOW 29
    • TI-2026-98132 JsonPath Queries Hold the Process Through Duplicated Nodes and Repeated WorkPriority LOW 29
    • TI-2026-98150 Symfony HTTP workers in CLI mode leak full exception dumpsPriority LOW 28

Timeline

  1. 2026-11-25 Threatist record created from CVE-2026-134791
  2. 2026-11-26 EPSS moved to the below the 50th percentile

References

  • TI-2026-34283 Twig: The `spaceless` filter implicitly marks its output as safe CVSS 4.0MEDIUM 5.1
  • TI-2022-07667 Code injection in Twig CVSS 3.1CRITICAL 9.8
  • TI-2018-10028 Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key… CVSS 3.0CRITICAL 9.8
  • TI-2022-08704 Symfony storing cookie headers in HttpCache CVSS 3.1HIGH 8.8
  • TI-2026-98149 Symfony Serializer CSV Header Nesting Without Limit Crashes PHP CVSS 4.0HIGH 8.7
  • TI-2026-98148 Nested short ternaries make the Symfony expression parser hang CVSS 4.0HIGH 8.7
See all 129 →

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences