Low, CVSS 1.3PackagistPublished
Twig: HTML-output filters in twig/* extras incorrectly declared is_safe => ['all']
CVE-2026-46637 · GHSA-jv8m-2544-3pg3
- Affected
- Packagist twig/cssinliner-extra < 3.26.0
- Fixed in
- 3.26.0· Vendor fix available
- Issue
- Several filters in the twig/ extras packages are registered with issafe = ['all'], which tells Twig's autoescaper to treat their output as safe in every context (html, js, css, url, ...). The output of these filters is plain text or HTML markup, neither of which is safe in every escaping context. Affected filters: - htmltomarkdown (twig/markdown-extra) emits plain Markdown text. league/html-to-markdown decodes HTML entities when producing code spans and fenced blocks, so an attacker-controlled <code<img src=x onerror=alert(1)></code becomes <img src=x onerror=alert(1) , which renders live when interpolated into an HTML page. - markdowntohtml (twig/markdown-extra) emits HTML. Safe in an HTML context but not in JS, CSS or URL contexts (e.g. when interpolated into an inline <script block). - inlinecss (twig/cssinliner-extra) emits HTML with inlined styles. Same constraint as markdowntohtml. In all three cases, issafe = ['all'] causes the autoescaper to emit the output…
Recommended action: Upgrade to 3.26.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.