Impact
Twig is a template language for PHP. Prior to 3.26.0, the deprecated spaceless filter is registered as safe for HTML, causing Twig auto‑escaping to emit attacker‑controlled markup unescaped when the filter is applied to untrusted input. This bypasses the templating engine’s protection, enabling an attacker to inject arbitrary HTML or JavaScript and conduct cross‑site scripting attacks.
Affected Systems
The vendor twigphp:Twig is affected. All Twig installations of version 3.x before 3.26.0 use the spaceless filter. Any environment that renders untrusted data through templates and applies the spaceless filter is impacted.
Risk and Exploitability
The CVSS score of 5.1 indicates moderate risk, while the EPSS score of < 1% denotes a low probability of exploitation. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector is a web application that passes untrusted data to a template with the filter applied, thereby bypassing auto‑escaping and enabling XSS.
OpenCVE Enrichment
Debian DSA
Github GHSA