Improper Encoding or Escaping of Output in Twig - CVE-2026-46637
Published: May 20, 2026
Twig
Detailed vulnerability description
The vulnerability allows a remote attacker to perform cross-site scripting.
The vulnerability exists due to improper encoding or escaping of output in html-output filters in twig/markdown-extra and twig/cssinliner-extra when rendering attacker-controlled content in non-html escaping contexts. A remote attacker can supply crafted input that is processed by affected filters to perform cross-site scripting.
The issue stems from filters being incorrectly declared with is_safe => ['all'], causing Twig autoescaping to treat output as safe across contexts such as html, javascript, css, and url.