What’s Vulnerable › Vulnerabilities
CVE-2026-47730: Twig: XSS in profiler HtmlDumper via unescaped template and profile names
- Severity: medium (CVSS 5.4 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-07-14 · updated 2026-10-24
- Weakness: CWE-79
Description
Twig is a template language for PHP. From 3.0.0 until 3.26.0, Twig\Profiler\Dumper\HtmlDumper writes Profile::getTemplate() and Profile::getName() into HTML output without escaping, allowing attacker-controlled template or profile names to inject arbitrary HTML when a browser renders the profiler dump. This issue is fixed in version 3.26.0.
Affected products
- twigphp Twig: from 3.0.0 before 3.26.0 — fixed in 3.26.0
How to fix
Upgrade to a fixed version: twigphp Twig 3.26.0. Check the vendor advisory for mitigations.
References
- https://github.com/twigphp/Twig/commit/a5f6e8793e603ef34fa86aed2a72f9fbe0b43745
- https://github.com/twigphp/Twig/releases/tag/v3.26.0
- https://github.com/twigphp/Twig/security/advisories/GHSA-2g2g-8p8h-fgwm
Get alerted when CVE-2026-47730 or the next vulnerability affects your stack