CVE-2026-46628 PUBLISHED

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

Assigner: GitHub_M
Reserved: 15.05.2026 Published: 14.07.2026 Updated: 15.07.2026

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.

Metrics

CVSS 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
CVSS Score: 5.1

Product Status

Vendor twigphp
Product Twig
Versions
  • Version < 3.26.0 is affected

References

Problem Types

  • CWE-116: Improper Encoding or Escaping of Output CWE