# CVE-2026-72781: Craft CMS 5.0.0-RC1 before 5.10.7 Remote Code Execution via Twig Sandbox Escape

- Severity: High 8.7 (CVSS:4.0, scored by VulnCheck) `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.54%, higher than 46% of CVEs (2026-12-01)
- Published: 2026-08-06T21:02:28.000Z
- Modified: 2026-10-24T15:10:00.190Z
- Also known as: GHSA-f5wm-88jv-g5hx
- Weaknesses: CWE-693
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- 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().

(As written by CVE List.)

## Affected

- craftcms cms: from 5.0.0-RC1 before 5.10.7; from 4.0.0-RC1 before 4.18.3 (not affected: 5.10.7; 4.18.3)
- craftcms/cms (Packagist): from 5.0.0-RC1 before 5.10.7; from 4.0.0-RC1 before 4.18.3

## Every score

- VulnCheck: CVSS:4.0 8.7 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- VulnCheck: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`

## References

- <https://github.com/craftcms/cms/security/advisories/GHSA-f5wm-88jv-g5hx> (vendor-advisory, web)
- <https://www.vulncheck.com/advisories/craft-cms-rc1-before-remote-code-execution-via-twig-sandbox-escape> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-72781> (advisory)
- <https://github.com/craftcms/cms/commit/0b8be1556be4e030578ec779c3e17ffe2e69d7db> (web)
- <https://github.com/craftcms/cms> (package)
- <https://github.com/craftcms/cms/releases/tag/4.18.3> (web)
- <https://github.com/craftcms/cms/releases/tag/5.10.7> (web)

## Sources

- CVE List: [CVE-2026-72781](https://www.cve.org/CVERecord?id=CVE-2026-72781), CVE Terms of Use, modified 2026-10-08
- GitHub Advisory Database: [GHSA-f5wm-88jv-g5hx](https://github.com/advisories/GHSA-f5wm-88jv-g5hx), CC-BY-4.0, modified 2026-09-01
- NVD: [CVE-2026-72781](https://nvd.nist.gov/vuln/detail/CVE-2026-72781), Public domain, modified 2026-10-24

---

Page: https://cve.day/CVE-2026-72781 · Whole record: https://cve.day/CVE-2026-72781.json · Rebuilt by cve.day 2026-11-25T22:59:32.250Z
