Improper Encoding or Escaping of Output in Twig - CVE-2026-46628
Published: May 20, 2026
Twig
Detailed vulnerability description
The vulnerability allows a remote attacker to execute arbitrary script in the victim's browser.
The vulnerability exists due to improper encoding or escaping of output in the `spaceless` filter when rendering attacker-controlled input in an HTML context. A remote attacker can supply crafted markup that is processed with the filter to execute arbitrary script in the victim's browser.
The issue occurs even when autoescaping is enabled and the developer does not explicitly use the `raw` filter.