Cross-site scripting in Twig - CVE-2026-47730
Published: May 20, 2026
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary script in the victim's browser.
The vulnerability exists due to cross-site scripting in Twig\Profiler\Dumper\HtmlDumper when rendering profiler output containing attacker-controlled template or profile names. A remote attacker can supply crafted template or profile names to execute arbitrary script in the victim's browser.
This affects profiler and debug output and is not a sandbox escape.
Affected software
Debian Linux
php-twig (Debian package)
How to mitigate CVE-2026-47730
php-twig (Debian package) - update to 3.5.1-1+deb12u3