Description
Craft CMS 4.x before 4.18.8 and 5.x before 5.11.0 contains a blocklist bypass in the Twig create() function because its class-name checks are case-sensitive while PHP class resolution is not. Attackers with template-execution rights, such as Control Panel administrators, can instantiate SplFileObject via a lowercase class name to read .env secrets or write a PHP file into the webroot for remote code execution.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| craftcms | cms | 4.0.0 – < 4.18.8, 5.0.0 – < 5.11.0 | 4.18.8 |
References
- GitHub Security Advisory (GHSA-w643-x88w-6wcm) vendor-advisory
- VulnCheck Advisory: Craft CMS before 4.18.8 and 5.11.0 Twig create() Blocklist Bypass Leading to RCE third-party-advisory