CVE-2026-46628CWE-116

Twig: The `spaceless` filter implicitly marks its output as safe

Medium · published July 14, 2026

CVSS v4.0
5.1
EPSS
0%
Percentile
21.0
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v4.0
5.1 · MEDIUM
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
EPSS
0.00295 · 21.0th percentile
Weakness
CWE-116 · Improper Encoding or Escaping of Output
Published
2026-07-14T21:19Z
EPSS history
Timeline
  • 14 JUL 21:19Z
    Twig: The `spaceless` filter implicitly marks its output as safe
    cvelistv5