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

- Severity: High 8.7 (CVSS:4.0, scored by Symfony) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.64%, higher than 52% of CVEs (2026-12-01)
- Published: 2026-11-25T10:00:22.747Z
- Modified: 2026-11-30T15:29:56.663Z
- Weaknesses: CWE-407
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- symfony/expression-language: from 7.2.0 before 7.4.24; from 8.0.0 before 8.1.12
- symfony/symfony: from 7.2.0 before 7.4.24; from 8.0.0 before 8.1.12

## References

- <https://symfony.com/cve-2026-134791> (vendor-advisory)
- <https://github.com/symfony/symfony/security/advisories/GHSA-5vf6-gchv-cmcr> (vendor-advisory)
- <https://github.com/symfony/symfony/commit/e098ffa5936c7c238b9c1a9d5cb82def4573de4f> (patch)

## Sources

- CVE List: [CVE-2026-134791](https://www.cve.org/CVERecord?id=CVE-2026-134791), CVE Terms of Use, modified 2026-11-25
- NVD: [CVE-2026-134791](https://nvd.nist.gov/vuln/detail/CVE-2026-134791), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-134791 · Whole record: https://cve.day/CVE-2026-134791.json · Rebuilt by cve.day 2026-11-30T15:32:22.218Z
