Mend.io Vulnerability Database
The largest open source vulnerability database
What is a Vulnerability ID?
New vulnerability? Tell us about it!
CVE-2026-47730
Published:June 14, 2026
Updated:June 15, 2026
Description "Twig\Profiler\Dumper\HtmlDumper" writes "Profile::getTemplate()" and "Profile::getName()" straight into its HTML output without escaping: protected function formatTemplate(Profile $profile, $prefix): string { return \sprintf('%sâ”” <span style="background-color: %s">%s</span>', $prefix, self::$colors['template'], $profile->getTemplate()); } The template name comes from the loader (the array key for "ArrayLoader", a row id for a database-backed loader, etc.). When that name is attacker-controlled, the profiler dump emits arbitrary HTML, and any browser that renders it executes the injected markup. This is an output-encoding bug in profiler/debug tooling, not a sandbox escape. Resolution "HtmlDumper" now runs both "Profile::getTemplate()" and "Profile::getName()" through "htmlspecialchars()" before inserting them into the HTML output. Credits Twig would like to thank El Kharoubi Iosif for reporting the issue and Nicolas Grekas for fixing it.
Affected Packages
twig/twig (PHP):
Affected version(s) >=v3.0.0 <v3.26.0
Fix Suggestion:
Update to version v3.26.0
twig/twig (PHP):
Affected version(s) >=3.x-dev <3.26.0
Fix Suggestion:
Update to version 3.26.0
Do you need more information?
Contact Us
CVSS v4
Base Score:
5.1
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
LOW
User Interaction
PASSIVE
Vulnerable System Confidentiality
LOW
Vulnerable System Integrity
LOW
Vulnerable System Availability
NONE
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
5.4
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
LOW
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Weakness Type (CWE)
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
EPSS
Base Score:
0.04