CVE-2026-46637 PUBLISHED

Twig: HTML-output filters in twig/* extras incorrectly declared `is_safe => ['all']`

Assigner: GitHub_M
Reserved: 15.05.2026 Published: 14.07.2026 Updated: 14.07.2026

Twig is a template language for PHP. Prior to 3.26.0, several filters in twig/markdown-extra and twig/cssinliner-extra are registered with is_safe => [all], causing Twig to treat plain text or HTML output as safe in HTML, JavaScript, CSS, URL, and other contexts where the output is not properly escaped. This issue is fixed in version 3.26.0.

Metrics

CVSS Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
CVSS Score: 5.1

Product Status

Vendor twigphp
Product Twig
Versions
  • Version < 3.26.0 is affected
Vendor twig
Product cssinliner-extra
Versions
  • Version < 3.26.0 is affected
Vendor twig
Product markdown-extra
Versions
  • Version < 3.26.0 is affected

References

Problem Types

  • CWE-116: Improper Encoding or Escaping of Output CWE