CVE-2026-72781: Protection Mechanism Failure in craftcms cms
Craft CMS versions >= 5.0.0-RC1 before 5.10.7 and >= 4.0.0-RC1 before 4.18.3 contain a remote code execution vulnerability in the Twig sandbox mechanism. Because Craft marks the ElementInterface as safe (via the AllowedInSandbox attribute) and the sandbox allowlisting extends to the entire class hierarchy (craft\base\Component up to yii\base\Component), an authenticated attacker with permission to access the control panel can render a malicious Twig template that abuses the yii\base\Component arbitrary function-call gadget to execute arbitrary code, even when the Twig sandbox is enabled via enableTwigSandbox().
AI Analysis
Technical Summary
Craft CMS versions >=5.0.0-RC1 before 5.10.7 and >=4.0.0-RC1 before 4.18.3 have a remote code execution vulnerability in the Twig sandbox. The vulnerability stems from the ElementInterface being marked as safe via the AllowedInSandbox attribute, which extends allowlisting to the entire class hierarchy from craft\base\Component up to yii\base\Component. An authenticated attacker with control panel permissions can exploit this by rendering a malicious Twig template that abuses the yii\base\Component arbitrary function-call gadget to execute arbitrary code, bypassing the protections of the Twig sandbox enabled by enableTwigSandbox().
Potential Impact
An authenticated attacker with permission to access the control panel can execute arbitrary code remotely on affected Craft CMS installations. This could lead to full system compromise depending on the privileges of the application user. The vulnerability bypasses the Twig sandbox protections, increasing the risk of exploitation in environments relying on this sandboxing mechanism.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict control panel access to trusted users only and consider disabling or limiting the use of Twig sandbox features if feasible. Monitor vendor channels for updates and apply patches promptly once released.
CVE-2026-72781: Protection Mechanism Failure in craftcms cms
Description
Craft CMS versions >= 5.0.0-RC1 before 5.10.7 and >= 4.0.0-RC1 before 4.18.3 contain a remote code execution vulnerability in the Twig sandbox mechanism. Because Craft marks the ElementInterface as safe (via the AllowedInSandbox attribute) and the sandbox allowlisting extends to the entire class hierarchy (craft\base\Component up to yii\base\Component), an authenticated attacker with permission to access the control panel can render a malicious Twig template that abuses the yii\base\Component arbitrary function-call gadget to execute arbitrary code, even when the Twig sandbox is enabled via enableTwigSandbox().
CVSS v4.0
Score 8.7high
Affected software
craftcms
cms
craftcms
cms
pkg:github/craftcms/cmsRun 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
Technical Analysis
Craft CMS versions >=5.0.0-RC1 before 5.10.7 and >=4.0.0-RC1 before 4.18.3 have a remote code execution vulnerability in the Twig sandbox. The vulnerability stems from the ElementInterface being marked as safe via the AllowedInSandbox attribute, which extends allowlisting to the entire class hierarchy from craft\base\Component up to yii\base\Component. An authenticated attacker with control panel permissions can exploit this by rendering a malicious Twig template that abuses the yii\base\Component arbitrary function-call gadget to execute arbitrary code, bypassing the protections of the Twig sandbox enabled by enableTwigSandbox().
Potential Impact
An authenticated attacker with permission to access the control panel can execute arbitrary code remotely on affected Craft CMS installations. This could lead to full system compromise depending on the privileges of the application user. The vulnerability bypasses the Twig sandbox protections, increasing the risk of exploitation in environments relying on this sandboxing mechanism.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict control panel access to trusted users only and consider disabling or limiting the use of Twig sandbox features if feasible. Monitor vendor channels for updates and apply patches promptly once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-08-10T15:09:12.955Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a7b18a3bf8831d539b86170
Added to database: 08/11/2026, 12:42:11 UTC
Last enriched: 08/11/2026, 13:03:34 UTC
Last updated: 09/25/2026, 13:47:48 UTC
Views: 59
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.