A security vulnerability (CVE-2026-46637) was discovered in Twig's extra packages where the `html_to_markdown`, `markdown_to_html`, and `inline_css` filters were incorrectly declared with `is_safe => ['all']`. This caused Twig's autoescaper to treat their output as safe in every context, including JS, CSS, and URL contexts, enabling XSS attacks. The fix in Twig 3.26.0 narrows the safety declarations: `html_to_markdown` is no longer marked safe in any context, while `markdown_to_html` and `inline_css` are now correctly declared `is_safe => ['html']` only.

2m read timeFrom symfony.com
Post cover image
22.7K Impressions1 Comment