Skip to content
OpenAdvisories
High · 8.8 Public exploit CVE-2026-72781 EUVD-2026-56105GHSA-f5wm-88jv-g5hxGHSA-h784-hpjp-2rrm

Craft CMS 5.0.0-RC1 before 5.10.7 Remote Code Execution via Twig Sandbox Escape

Published Aug 11, 2026 · Updated Oct 8, 2026 · Assigned by VulnCheck

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().

Affected products

VendorProductAffectedFixed
craftcms cms 5.0.0-RC1 – < 5.10.7, 4.0.0-RC1 – < 4.18.3 5.10.7

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
Packagist craftcms/cms >= 5.0.0-RC1, < 5.10.7 5.10.7 GHSA-f5wm-88jv-g5hx
Packagist craftcms/cms >= 4.0.0-RC1, < 4.18.3 4.18.3 GHSA-f5wm-88jv-g5hx

References