CVE-2026-134791
published high CVSS 4.0 · 8.7Unclosed Comments Make the Lexer of ExpressionLanguage Quadratic, Letting Untrusted Expressions Hold a Process
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Symfony | — | symfony/expression-language7.2.0 to < 7.4.24 · 8.0.0 to < 8.1.12 · Other versions: unaffected | Affected | Not stated | Symfony |
| Symfony | — | symfony/symfony7.2.0 to < 7.4.24 · 8.0.0 to < 8.1.12 · Other versions: unaffected | Affected | Not stated | 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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.7 / 10
- Severity
- high
- Provider
- Symfony · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Symfony | symfony/expression-language | 7.2.0 to < 7.4.24 (affected · semver)8.0.0 to < 8.1.12 (affected · semver)Default: unaffected | Symfony · cna |
| Symfony | symfony/symfony | 7.2.0 to < 7.4.24 (affected · semver)8.0.0 to < 8.1.12 (affected · semver)Default: unaffected | Symfony · cna |
Weaknesses
1- CWE-407 CWE-407 Inefficient Algorithmic Complexity
References
3- https://github.com/symfony/symfony/commit/e098ffa5936c7c238b9c1a9d5cb82def4573de4f
- GHSA-5vf6-gchv-cmcr https://github.com/symfony/symfony/security/advisories/GHSA-5vf6-gchv-cmcr
- CVE-2026-134791 https://symfony.com/cve-2026-134791
Provider assertions
2Symfony · cna
Unclosed Comments Make the Lexer of ExpressionLanguage Quadratic, Letting Untrusted Expressions Hold a Process
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 624c0b1ad6c6caf25a14fe309ee00cb52bf064815d2245cdb5dc4c72b2670b4b
- Ingested
- 25 Nov 2026, 20:03:18 UTC
- Source record
- Official CVE record