Executive brief
Craft CMS is a popular content management system used to build and manage websites. A vulnerability in the control panel allows authenticated users (those with valid login credentials and a CSRF token) to execute arbitrary operating system commands by bypassing security validation of configuration parameters. An attacker could read sensitive data, modify site content, access database credentials, or establish persistence on the server.
Technical details
The vulnerability is a configuration validation bypass (CWE-915) in Craft CMS's element-search condition handling. Craft::cleanseConfig() sanitizes the outer condition array, but Conditions::createCondition() later JSON-decodes the condition.config field without re-running cleanseConfig(). Because the JSON string bypasses initial validation, Yii special config keys ('as ...' and 'on ...' for behavior and event handlers) can be hidden inside and are interpreted during FieldLayout object creation. Attack vector is network-based and requires an authenticated control panel session with a valid CSRF token. An attacker can execute arbitrary OS commands as the PHP/web user, read environment variables and secrets, access database credentials, modify site content, or pivot to internal services. The exploit is described as "semi-blind" with output verification via server-side side effects. Patches are available in versions 4.18.2 and 5.10.6.
Affected products
- Craft CMS Craft CMS 4.0.0-RC1 to 4.18.1, 5.0.0-RC1 to 5.10.5
Timeline
- 2026-07-25: disclosed
- 2026-07-25: patched: Versions 4.18.2 and 5.10.6 released with patch
- 2026-08-11: advisory: GHSA-265m-7826-wjqm primary advisory published; GHSA-w36c-qxrq-v7fw is a duplicate