CVE-2026-47730: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in twigphp Twig
Twig versions from 3.0.0 up to but not including 3.26.0 contain a cross-site scripting (XSS) vulnerability in the HtmlDumper component of the profiler. This occurs because Profile::getTemplate() and Profile::getName() are written into HTML output without proper escaping, allowing attacker-controlled template or profile names to inject arbitrary HTML when rendered in a browser. The issue is fixed starting in version 3.26.0.
AI Analysis
Technical Summary
The vulnerability in twigphp Twig affects versions 3.0.0 through 3.25.x where the HtmlDumper class in the profiler writes unescaped template and profile names into HTML output. This improper neutralization of input (CWE-79) enables cross-site scripting attacks if an attacker can control template or profile names. The flaw is resolved in version 3.26.0 by properly escaping these values before output.
Potential Impact
An attacker who can influence template or profile names may inject arbitrary HTML or script code into the profiler's HTML output. This could lead to cross-site scripting attacks when the profiler dump is viewed in a browser, potentially compromising user interaction with the profiler interface. The CVSS 4.0 base score is 5.1 (medium severity), reflecting network attack vector, low complexity, no privileges required, and user interaction needed.
Mitigation Recommendations
Upgrade Twig to version 3.26.0 or later, where this vulnerability is fixed by escaping the relevant output. No other official remediation or temporary fixes are documented. Patch status is confirmed fixed in 3.26.0.
CVE-2026-47730: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in twigphp Twig
Description
Twig versions from 3.0.0 up to but not including 3.26.0 contain a cross-site scripting (XSS) vulnerability in the HtmlDumper component of the profiler. This occurs because Profile::getTemplate() and Profile::getName() are written into HTML output without proper escaping, allowing attacker-controlled template or profile names to inject arbitrary HTML when rendered in a browser. The issue is fixed starting in version 3.26.0.
CVSS v4.0
Score 5.1medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in twigphp Twig affects versions 3.0.0 through 3.25.x where the HtmlDumper class in the profiler writes unescaped template and profile names into HTML output. This improper neutralization of input (CWE-79) enables cross-site scripting attacks if an attacker can control template or profile names. The flaw is resolved in version 3.26.0 by properly escaping these values before output.
Potential Impact
An attacker who can influence template or profile names may inject arbitrary HTML or script code into the profiler's HTML output. This could lead to cross-site scripting attacks when the profiler dump is viewed in a browser, potentially compromising user interaction with the profiler interface. The CVSS 4.0 base score is 5.1 (medium severity), reflecting network attack vector, low complexity, no privileges required, and user interaction needed.
Mitigation Recommendations
Upgrade Twig to version 3.26.0 or later, where this vulnerability is fixed by escaping the relevant output. No other official remediation or temporary fixes are documented. Patch status is confirmed fixed in 3.26.0.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-19T21:29:25.483Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a56aea268715ace4342b110
Added to database: 07/14/2026, 21:48:18 UTC
Last enriched: 07/14/2026, 22:23:57 UTC
Last updated: 07/14/2026, 22:27:29 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.