CVE-2026-72781
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().
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
craftcms/cmsPackagist | >= 5.0.0-RC1, < 5.10.7 | 5.10.7 |
craftcms/cmsPackagist | >= 4.0.0-RC1, < 4.18.3 | 4.18.3 |
Affected products
2Patches
Vulnerability mechanics
References
7- github.com/advisories/GHSA-f5wm-88jv-g5hxghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-72781ghsaADVISORY
- github.com/craftcms/cms/commit/0b8be1556be4e030578ec779c3e17ffe2e69d7dbghsaWEB
- github.com/craftcms/cms/releases/tag/4.18.3ghsaWEB
- github.com/craftcms/cms/releases/tag/5.10.7ghsaWEB
- github.com/craftcms/cms/security/advisories/GHSA-f5wm-88jv-g5hxnvdWEB
- www.vulncheck.com/advisories/craft-cms-rc1-before-remote-code-execution-via-twig-sandbox-escapenvdWEB
News mentions
0No linked articles in our index yet.