CVE-2026-72781
Craft CMS versions >= 5.0.0-RC1 before 5.10.7 and >= 4.0.0-RC1 …
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().
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Set the orderSystems that can be reached from the internet come first, then the rest.
References
- github.com/craftcms/cms/security/advisories/GHSA-f5wm-88jv-g5hx
- www.vulncheck.com/advisories/craft-cms-rc1-before-remote-code-execution-via-twig-sandbox-e
- github.com/craftcms/cms/commit/0b8be1556be4e030578ec779c3e17ffe2e69d7db
- github.com/craftcms/cms/releases/tag/4.18.3
- github.com/craftcms/cms/releases/tag/5.10.7
- nvd.nist.gov/vuln/detail/CVE-2026-72781
- github.com/advisories/GHSA-f5wm-88jv-g5hx
- nvd.nist.gov/vuln/detail/CVE-2026-72781
- cve.org/CVERecord?id=CVE-2026-72781
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.