{"id":"CVE-2026-72781","published":"2026-08-11T12:17:16Z","modified":"2026-10-08T15:24:27Z","title":"Craft CMS 5.0.0-RC1 before 5.10.7 Remote Code Execution via Twig Sandbox Escape","vendor":"Craft CMS","product":"cms","tier":"tail","description":{"text":"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().","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00786,"percentile":0.5268,"provenance":"source"},"cwes":[{"id":"CWE-693","name":"Protection Mechanism Failure"}],"references":[{"url":"https://github.com/craftcms/cms/security/advisories/GHSA-f5wm-88jv-g5hx","tags":["vendor-advisory"]},{"url":"https://www.vulncheck.com/advisories/craft-cms-rc1-before-remote-code-execution-via-twig-sandbox-escape","tags":["third-party-advisory"]}],"priority":{"score":21.7,"factors":[{"name":"EPSS percentile","points":10.54},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.16}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-09-21","earliestUrl":"https://github.com/TRX-0/CVE-2026-72781-craftcms-sandbox-rce","repos":[{"name":"TRX-0/CVE-2026-72781-craftcms-sandbox-rce","url":"https://github.com/TRX-0/CVE-2026-72781-craftcms-sandbox-rce","stars":0,"created":"2026-09-21"}]},"first":{"date":"2026-09-21","source":"PoC-in-GitHub","url":"https://github.com/TRX-0/CVE-2026-72781-craftcms-sandbox-rce"},"provenance":"source"},"vendorSlug":"craft-cms","affectedVersions":[{"vendor":"craftcms","product":"cms","versions":[">= 5.0.0-RC1, < 5.10.7"]},{"vendor":"craftcms","product":"cms","versions":[">= 4.0.0-RC1, < 4.18.3"]}],"fixedVersions":[{"vendor":"craftcms","product":"cms","versions":["5.10.7"]},{"vendor":"craftcms","product":"cms","versions":["4.18.3"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-08-11T14:01:20.422669Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"craftcms/cms","vulnerableRanges":[">=5.0.0-RC1, <5.10.7",">=4.0.0-RC1, <4.18.3"],"patched":["5.10.7","4.18.3"],"from":["GHSA-f5wm-88jv-g5hx"],"provenance":"source"}],"summary":{"text":"Craft CMS contains a flaw in its Twig sandbox mechanism, which is meant to restrict template execution, affecting versions from 5.0.0-RC1 before 5.10.7 and from 4.0.0-RC1 before 4.18.3. Because the sandbox allowlists ElementInterface and, through the class hierarchy, craft\\base\\Component and yii\\base\\Component, an attacker who has control panel access and can render a crafted Twig template can abuse the arbitrary function-call behaviour in yii\\base\\Component to execute arbitrary code on the server, even when enableTwigSandbox() is enabled.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:35:59Z"},"euvd":{"id":"EUVD-2026-56105","exploited":false,"provenance":"source"}}