Summary
Craft CMS: Authenticated RCE via condition.config JSON cleanse bypass
Craft CMS has an authenticated remote code execution issue in the control panel element-search condition handling.
Craft cleans the outer request-controlled condition array with Component::cleanseConfig(), but Conditions::createCondition() later decodes and merges the JSON string in condition.config without re-running cleanseConfig() on the decoded/merged configuration.
Because condition.config is a JSON string during the first cleanse, Yii special config keys such as as ... and on ... can be hidden inside it. After JSON decoding, those keys reach FieldLayout object creation and are interpreted by Yii as behavior/event configuration.
The RCE is semi-blind: the trigger endpoint returns a normal JSON response, and the command output is verified via a server-side file-write side effect retrieved in a subsequent request.
Preconditions
- The attacker needs an authenticated Craft control panel session.
- A valid CSRF token is required.
Impact
An authenticated control panel user can inject Yii behavior/event configuration after Craft’s intended config cleanse boundary. In the confirmed local lab, this led to command execution as the PHP/web user.
Potential attacker impact:
- Execute operating system commands as the PHP/web user.
- Read Craft secrets, environment variables, and application configuration.
- Access database credentials and stored site content.
- Modify site content, users, and application state.
- Pivot to internal services reachable from the Craft host or container.
- Cause denial of service or establish persistence depending on deployment permissions.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
craftcms/cms to 5.10.6 or later; craftcms/cms to 4.18.2 or later
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is GHSA-265M-7826-WJQM? GHSA-265M-7826-WJQM is a high-severity security vulnerability in craftcms/cms (composer), affecting versions >= 5.0.0-RC1, < 5.10.6. It is fixed in 5.10.6, 4.18.2.
- Which versions of craftcms/cms are affected by GHSA-265M-7826-WJQM? craftcms/cms (composer) versions >= 5.0.0-RC1, < 5.10.6 is affected.
- Is there a fix for GHSA-265M-7826-WJQM? Yes. GHSA-265M-7826-WJQM is fixed in 5.10.6, 4.18.2. Upgrade to this version or later.
- Is GHSA-265M-7826-WJQM exploitable, and should I be worried? Whether GHSA-265M-7826-WJQM is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-265M-7826-WJQM is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-265M-7826-WJQM?
- Upgrade
craftcms/cmsto 5.10.6 or later - Upgrade
craftcms/cmsto 4.18.2 or later
- Upgrade