BuzzPHP
LightDarkSystem

Craft CMS: Authenticated RCE through Twig sandbox escape

High severity. Published 6 August 2026. Update craftcms/cms to the fixed version of your branch (5.10.7, 4.18.3): composer update craftcms/cms.

Which versions are affected?

PackageAffected versionsFixed in
craftcms/cms (opens in a new tab)>= 5.0.0-RC1, < 5.10.7 | >= 4.0.0-RC1, < 4.18.35.10.7, 4.18.3

What should you do?

Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:

composer show craftcms/cms
composer audit

Advisory details

SeverityHigh
Published
Updated
CVECVE-2026-72781 (opens in a new tab)
GHSAGHSA-f5wm-88jv-g5hx (opens in a new tab)
WeaknessCWE-693

What the advisory says

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.

Source: GHSA-f5wm-88jv-g5hx (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .

Other recent advisories for this package

All Composer security advisories