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.8%top 48%

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

0
High
VulnerabilityCVE-2026-24425cvecve-2026-24425cwe-693
Published: 05/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.

CVSS v4.0

Score 8.7high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected software

Packagistmore threats →ai
twig/twig
pkg:composer/twig/twig
Affected versions
=3.9.0>=2.16.0 <2.17.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/15/2026, 11:05:18 UTC

Technical Analysis

The vulnerability in Twig (CVE-2026-24425) involves a sandbox bypass when using a SourcePolicyInterface. Attackers who can render templates can exploit the failure in the runtime check that does not correctly reference the current template source, allowing them to pass arbitrary PHP callables to filters such as sort, filter, map, and reduce. This bypasses sandbox restrictions and enables arbitrary code execution despite sandboxing being enabled through a source policy rather than globally. Affected versions include 2.16.x and 3.9.0 through 3.25.x. No official remediation or patch is currently documented.

Potential Impact

Successful exploitation allows attackers with template rendering privileges to bypass sandbox restrictions and execute arbitrary PHP code. This can lead to full code execution within the context of the application using Twig, potentially compromising the host system or application data. The vulnerability is rated high severity with a CVSS 4.0 score of 8.7, reflecting network attack vector, low attack complexity, no privileges required beyond template rendering, and high impact on confidentiality, integrity, and availability.

Mitigation Recommendations

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

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: 05/20/2026, 14:19:19 UTC

Last enriched: 07/15/2026, 11:05:18 UTC

Last updated: 07/31/2026, 19:22:58 UTC

Views: 74

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