What’s Vulnerable › Vulnerabilities
CVE-2026-46628: Twig: The `spaceless` filter implicitly marks its output as safe
- Severity: medium (CVSS 5.4 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-07-14 · updated 2026-10-24
- Weakness: CWE-116
Description
Twig is a template language for PHP. Prior to 3.26.0, the deprecated spaceless filter is registered as safe for HTML, causing Twig autoescaping to emit attacker-controlled markup unescaped when spaceless is applied to untrusted input. This issue is fixed in version 3.26.0.
Affected products
- twigphp Twig: before 3.26.0 — fixed in 3.26.0
How to fix
Upgrade to a fixed version: twigphp Twig 3.26.0. Check the vendor advisory for mitigations.
References
- https://github.com/twigphp/Twig/commit/3190b9ae12614dfd58cc5d8f394bac4708b17913
- https://github.com/twigphp/Twig/releases/tag/v3.26.0
- https://github.com/twigphp/Twig/security/advisories/GHSA-4j38-f5cw-54h7
- https://github.com/twigphp/Twig/security/advisories/GHSA-4j38-f5cw-54h7
Get alerted when CVE-2026-46628 or the next vulnerability affects your stack