Vulnerability · Published Jul 14, 2026 · Assigned by GitHub_M

CVE-2026-47730Twig: XSS in profiler HtmlDumper via unescaped template and profile names

Medium 5.1

In plain English

A medium-severity cross-site scripting in Twig from twigphp. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 22% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)5.1Medium
Exploit odds (30 days)0.3%top 77.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12php-twig3.5.1-1+deb12u3DEBIAN-CVE-2026-47730
Debian:13php-twig3.27.0-0+deb13u1DEBIAN-CVE-2026-47730
Debian:14php-twig3.26.0-1DEBIAN-CVE-2026-47730
Packagisttwig/twig3.26.0GHSA-2g2g-8p8h-fgwm
Ubuntu:25.10php-twigno fix listedUBUNTU-CVE-2026-47730
Ubuntu:26.10php-twigno fix listedUBUNTU-CVE-2026-47730

Affected products (as reported)

VendorProductVersions
twigphp Twig >= 3.0.0, < 3.26.0

Weakness: CWE-79 · 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

References