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…

CVE-2026-46637: CWE-116: Improper Encoding or Escaping of Output in twigphp Twig

0
Medium
VulnerabilityCVE-2026-46637cvecve-2026-46637cwe-116
Published: 07/14/2026 (07/14/2026, 21:25:20 UTC)
Source: CVE Database V5
Vendor/Project: twigphp
Product: Twig

Description

Twig versions prior to 3.26.0 have a vulnerability where several filters in twig/markdown-extra and twig/cssinliner-extra are incorrectly registered as safe for all contexts, causing improper encoding or escaping of output. This can lead to unsafe output in HTML, JavaScript, CSS, URL, and other contexts. The 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.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/14/2026, 22:24:09 UTC

Technical Analysis

CVE-2026-46637 describes an improper encoding or escaping vulnerability (CWE-116) in the Twig template engine for PHP. Specifically, before version 3.26.0, several filters in the twig/markdown-extra and twig/cssinliner-extra extensions are registered with is_safe => [all], which causes Twig to treat output as safe across multiple contexts without proper escaping. This can result in unsafe output rendering in HTML, JavaScript, CSS, URL, and other contexts. The vulnerability is addressed by correcting the safety registration in Twig 3.26.0.

Potential Impact

The vulnerability may allow unsafe output to be rendered in various contexts such as HTML, JavaScript, CSS, and URLs, potentially leading to injection issues or cross-site scripting (XSS) if untrusted input is processed through these filters. The CVSS 4.0 base score is 5.1 (medium severity), indicating a moderate risk with network attack vector, low complexity, and requiring low privileges and user interaction.

Mitigation Recommendations

Upgrade Twig to version 3.26.0 or later, where this issue is fixed. Since the vendor advisory confirms the fix in 3.26.0, applying this official patch is the recommended remediation. No other mitigation steps are specified.

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-15T20:11:54.584Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a56aea268715ace4342b0fc

Added to database: 07/14/2026, 21:48:18 UTC

Last enriched: 07/14/2026, 22:24:09 UTC

Last updated: 07/14/2026, 22:27:34 UTC

Views: 2

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