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-24425: CWE-693 Protection Mechanism Failure in twigphp Twig

0
High
VulnerabilityCVE-2026-24425cvecve-2026-24425cwe-693
Published: Wed May 20 2026 (05/20/2026, 13:45:02 UTC)
Source: CVE Database V5
Vendor/Project: twigphp
Product: Twig

Description

Twig versions 2.16.x and 3.9.0 through 3.25.x contain a sandbox bypass vulnerability when using a SourcePolicyInterface that allows attackers with template rendering capabilities to pass arbitrary PHP callables to sort, filter, map, and reduce filters. Attackers can exploit the runtime check that fails to use the current template source to bypass sandbox restrictions and execute arbitrary code when the sandbox is enabled through a source policy rather than globally.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 05/20/2026, 14:34:10 UTC

Technical Analysis

CVE-2026-24425 is a sandbox bypass vulnerability in twigphp's Twig templating engine affecting versions 2.16.x and 3.9.0 through 3.25.x. The issue occurs when using a SourcePolicyInterface to enable sandboxing, allowing attackers with template rendering permissions to supply arbitrary PHP callables to filters such as sort, filter, map, and reduce. The runtime check intended to enforce sandbox restrictions fails to correctly validate the source context, enabling bypass of sandbox protections and arbitrary code execution. This vulnerability is classified under CWE-693 (Protection Mechanism Failure) and has a CVSS 4.0 score of 8.7 (high severity). No patch or official remediation level has been published, and no exploits are currently known in the wild.

Potential Impact

Successful exploitation allows an attacker who can render templates to bypass sandbox restrictions and execute arbitrary PHP code within the context of the application. This can lead to unauthorized code execution, potentially compromising the affected system. The vulnerability affects specific Twig versions and requires the sandbox to be enabled via a SourcePolicyInterface, not globally. There are no known active exploits reported at this time.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid enabling sandboxing through a SourcePolicyInterface or restrict template rendering capabilities to trusted users only. Monitor vendor communications for updates on patches or official mitigations.

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
VulnCheck
Date Reserved
2026-01-22T20:23:19.801Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a0dc2e7ba1db4736284c24c

Added to database: 5/20/2026, 2:19:19 PM

Last enriched: 5/20/2026, 2:34:10 PM

Last updated: 5/21/2026, 6:24:29 AM

Views: 5

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