CVE-2026-72781: Craft CMS · Authenticated RCE through Twig sandbox escape
Affects craftcms/cmsSource GCVE Database
Mentioned vulnerabilities
CVSS 8.7 High : upgrade to 5.10.7 soon.
Data as of 12 Sep 2026, 06:32 UTC
- Patch
- Available – fixed in 5.10.7, 4.18.3
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NWhat to do
Upgrade craftcms/cms to 5.10.7; craftcms/cms to 4.18.3.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Packagistcraftcms/cms | Affected
| Fixed in
|
| Packagistcraftcms/cms | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available for this vulnerability. Users should upgrade to Craft CMS versions 4.18.3 or later and 5.10.7 or later to remediate the issue. Until patched, restricting control panel access to trusted users is recommended. No other specific mitigations are indicated.
Description
Craft CMS contains an authenticated remote code execution (RCE) vulnerability via the Twig sandbox escape mechanism. The vulnerability arises because the Twig sandbox's allowlisting permits dangerous functionality from the Yii framework, specifically through a function-call gadget in yii\base\Component. An authenticated user with control panel access can exploit this by rendering a malicious Twig template, bypassing sandbox protections. This affects Craft CMS versions from 4.0.0-RC1 up to but not including 4.18.3, and 5.0.0-RC1 up to but not including 5.10.7. A patch is available to remediate this issue.
References
- github.com/craftcms/cms/security/advisories/GHSA-f5wm-88jv-g5hx (opens in a new tab)
- github.com/craftcms/cms/commit/0b8be1556be4e030578ec779c3e17ffe2e69d7db (opens in a new tab)
- github.com/craftcms/cms (opens in a new tab)
- github.com/craftcms/cms/releases/tag/4.18.3 (opens in a new tab)
- github.com/craftcms/cms/releases/tag/5.10.7 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-72781 (opens in a new tab)
- vulncheck.com/advisories/craft-cms-rc1-before-remote-code-execution-via-twig-sandbox-escape (opens in a new tab)