Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.3%top 78%

CVE-2026-47730: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in twigphp Twig

0
Medium
VulnerabilityCVE-2026-47730cvecve-2026-47730cwe-79
Published: 07/14/2026 (07/14/2026, 21:21:10 UTC)
Source: CVE Database V5
Vendor/Project: twigphp
Product: Twig

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.

CVSS v4.0

Score 5.1medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Passive
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
Low
Subsq. Integrity
Low
Subsq. Availability
None
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

Affected software

Packagistmore threats →ai
twig/twig
pkg:composer/twig/twig
Affected versions
>=3.0.0 <3.26.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/22/2026, 22:28:11 UTC

Technical Analysis

Twig is a PHP template engine. Versions >=3.0.0 and <3.26.0 have an XSS vulnerability (CWE-79) in the Twig\Profiler\Dumper\HtmlDumper class. Specifically, the methods Profile::getTemplate() and Profile::getName() output unescaped data into HTML profiler dumps, enabling attacker-controlled template or profile names to inject arbitrary HTML code. This vulnerability is addressed in Twig version 3.26.0.

Potential Impact

An attacker able to control template or profile names can inject arbitrary HTML into profiler output viewed in a browser, potentially leading to cross-site scripting attacks. This could allow execution of malicious scripts in the context of the user viewing the profiler dump. The CVSS 4.0 base score is 5.1 (medium severity), reflecting network attack vector, low complexity, and required user interaction.

Mitigation Recommendations

Upgrade Twig to version 3.26.0 or later, where this vulnerability is fixed. No other official remediation or temporary fixes are indicated. Patch status is confirmed by the vendor advisory stating the issue is fixed in 3.26.0.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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/22/2026, 22:28:11 UTC

Last updated: 08/27/2026, 22:52:11 UTC

Views: 65

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses