# Craft CMS: Authenticated RCE through Twig sandbox escape

High severity, published 2026-08-06. Update craftcms/cms to the fixed version of your branch (5.10.7, 4.18.3): composer update craftcms/cms.

Canonical URL: https://buzzphp.com/security/ghsa-f5wm-88jv-g5hx · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high |
| Published | 2026-08-06 |
| Updated | 2026-09-01 |
| CVE | [CVE-2026-72781](https://nvd.nist.gov/vuln/detail/CVE-2026-72781) |
| GHSA | [GHSA-f5wm-88jv-g5hx](https://github.com/advisories/GHSA-f5wm-88jv-g5hx) |
| Weakness | CWE-693 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| craftcms/cms | >= 5.0.0-RC1, < 5.10.7 or >= 4.0.0-RC1, < 4.18.3 | 5.10.7, 4.18.3 |

## What to do

Update craftcms/cms to the fixed version of your branch (5.10.7, 4.18.3): composer update craftcms/cms.

Check which version you run with `composer show craftcms/cms`, and every affected package with `composer audit`.

## About this advisory

The Twig sandbox mechanism in Craft CMS is configured to allow dangerous functionality from the Yii framework, leading to authenticated RCE in a manner similar to previously disclosed vulnerabilities.

The Twig sandbox in Craft CMS works by implementing Twig's SecurityPolicyInterface. The resulting SecurityPolicy class implements the checkMethodAllowed and checkPropertyAllowed methods of the interface. The implementations compare whether the called method or property is in a configured allowlist or is marked with the AllowedInSandbox attribute.



## Links

- [GHSA-f5wm-88jv-g5hx on GitHub](https://github.com/advisories/GHSA-f5wm-88jv-g5hx)
- [CVE-2026-72781 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-72781)
- [All Composer security advisories](https://buzzphp.com/security)
