Yii CVE-2024-58136: Framework Flaw Behind Craft CMS RCE
Fixed in Yii 2.0.52 and in Craft 3.9.15, 4.14.15 and 5.6.17 since April 2025; confirm both versions, and if a Craft site sat unpatched in early 2025, look for dropped PHP files because upgrading does not remove them.
Must act: Owners of Craft CMS 3, 4 or 5 sites below 3.9.15, 4.14.15 or 5.6.17, and teams running Yii 2 applications before 2.0.52 that pass request data into object configuration.
Can relax: Craft Cloud customers, sites on patched Craft releases with Yii 2.0.52 or later, and Yii 3 or non-Yii PHP applications.
- Run composer show yiisoft/yii2 and composer show craftcms/cms in each project and confirm Yii 2.0.52+ and a patched Craft release.
- Upgrade Craft and its plugins to current releases; Craft's later releases also fix the separately exploited CVE-2024-56145 and CVE-2025-35939.
- Until upgraded, block POST bodies to actions/assets/generate-transform that contain __class at the WAF or proxy, as Craft suggests.