CVE-2026-47730 PUBLISHED

Twig: XSS in profiler HtmlDumper via unescaped template and profile names

Assigner: GitHub_M
Reserved: 19.05.2026 Published: 14.07.2026 Updated: 14.07.2026

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.

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.0.0, < 3.26.0 is affected

References

Problem Types

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') CWE