Skip to main content
← All vulnerabilities
CVE-2026-46628GHSA-4J38-F5CW-54H7

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 3.26.0
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • twigphp Twig

    fixed in 3.26.0

  • twig/twigPackagist

    fixed in 3.26.0

References 3

GitHub · twigphp/Twig