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.5%top 61%

CVE-2026-46638: CWE-693: Protection Mechanism Failure in twigphp Twig

0
Medium
VulnerabilityCVE-2026-46638cvecve-2026-46638cwe-693
Published: 07/14/2026 (07/14/2026, 21:23:50 UTC)
Source: CVE Database V5
Vendor/Project: twigphp
Product: Twig

Description

Twig, a PHP template language, has a protection mechanism failure vulnerability prior to version 3.26.0. The issue involves the sandbox feature where {% sandbox %}{% include %} can include a template previously loaded outside the sandbox without re-checking security policies. This allows cached templates to use tags, filters, and functions that should have been denied by SecurityPolicy::checkSecurity(). The vulnerability is fixed in version 3.26.0.

CVSS v4.0

Score 6.0medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
Low
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/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/21/2026, 22:48:29 UTC

Technical Analysis

CVE-2026-46638 describes a protection mechanism failure in twigphp Twig versions before 3.26.0. Specifically, when using the sandbox feature with the include tag, a template previously loaded outside the sandbox context can be included without re-invoking the security checks enforced by SecurityPolicy::checkSecurity(). This flaw permits the cached template to execute tags, filters, and functions that the sandbox policy should have restricted. The issue is resolved in Twig version 3.26.0.

Potential Impact

An attacker able to influence template inclusion could bypass sandbox security restrictions, potentially executing unauthorized tags, filters, or functions within Twig templates. This could lead to unintended code execution or information disclosure depending on the context of template usage. The CVSS 4.0 score of 6 (medium severity) reflects a network attack vector with low privileges required and partial impact on confidentiality and integrity.

Mitigation Recommendations

Upgrade Twig to version 3.26.0 or later, where this vulnerability is fixed. No other mitigations are indicated. Patch status is confirmed 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-15T20:11:54.584Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a56aea268715ace4342b102

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

Last enriched: 07/21/2026, 22:48:29 UTC

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

Views: 51

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