Craft CMS: Authenticated RCE via `condition.config` JSON cleanse bypass
Craft CMS contains an authenticated remote code execution (RCE) vulnerability in its control panel element-search condition handling. The flaw arises because the system cleanses the outer condition array but fails to re-cleanse the JSON-decoded 'condition.config' string, allowing special Yii configuration keys to be injected and interpreted as behavior or event configuration. Exploitation requires an authenticated control panel session and a valid CSRF token. Successful exploitation can lead to execution of OS commands as the PHP/web user, exposure of sensitive data, modification of site content, and potential lateral movement within the environment.
AI Analysis
Technical Summary
The vulnerability in Craft CMS stems from improper handling of the 'condition.config' JSON string within the control panel's element-search condition processing. Although the outer request-controlled condition array is cleansed using 'Component::cleanseConfig()', the JSON string inside 'condition.config' is decoded and merged without a subsequent cleanse. This allows an attacker with authenticated access and a valid CSRF token to inject Yii special config keys such as 'as' and 'on', which are interpreted as behavior or event configurations by Yii during FieldLayout object creation. This leads to semi-blind remote code execution, where command output is verified through server-side side effects. The vulnerability enables execution of arbitrary OS commands as the PHP/web user and access to sensitive application data and configuration.
Potential Impact
An authenticated user with control panel access can execute arbitrary operating system commands as the PHP/web user. This includes reading sensitive Craft CMS secrets, environment variables, application configuration, and database credentials. The attacker can modify site content, user accounts, and application state, potentially causing denial of service or establishing persistence. Additionally, the attacker may pivot to internal services accessible from the Craft host or container, increasing the scope of compromise.
Mitigation Recommendations
A patch is available for this vulnerability. Users should apply the official fix provided by the Craft CMS vendor to ensure that the 'condition.config' JSON string is properly cleansed before processing. Since this is not a cloud service, remediation depends on applying the vendor's patch. Check the vendor advisory for the latest patch details and update instructions.
Craft CMS: Authenticated RCE via `condition.config` JSON cleanse bypass
Description
Craft CMS contains an authenticated remote code execution (RCE) vulnerability in its control panel element-search condition handling. The flaw arises because the system cleanses the outer condition array but fails to re-cleanse the JSON-decoded 'condition.config' string, allowing special Yii configuration keys to be injected and interpreted as behavior or event configuration. Exploitation requires an authenticated control panel session and a valid CSRF token. Successful exploitation can lead to execution of OS commands as the PHP/web user, exposure of sensitive data, modification of site content, and potential lateral movement within the environment.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Craft CMS stems from improper handling of the 'condition.config' JSON string within the control panel's element-search condition processing. Although the outer request-controlled condition array is cleansed using 'Component::cleanseConfig()', the JSON string inside 'condition.config' is decoded and merged without a subsequent cleanse. This allows an attacker with authenticated access and a valid CSRF token to inject Yii special config keys such as 'as' and 'on', which are interpreted as behavior or event configurations by Yii during FieldLayout object creation. This leads to semi-blind remote code execution, where command output is verified through server-side side effects. The vulnerability enables execution of arbitrary OS commands as the PHP/web user and access to sensitive application data and configuration.
Potential Impact
An authenticated user with control panel access can execute arbitrary operating system commands as the PHP/web user. This includes reading sensitive Craft CMS secrets, environment variables, application configuration, and database credentials. The attacker can modify site content, user accounts, and application state, potentially causing denial of service or establishing persistence. Additionally, the attacker may pivot to internal services accessible from the Craft host or container, increasing the scope of compromise.
Mitigation Recommendations
A patch is available for this vulnerability. Users should apply the official fix provided by the Craft CMS vendor to ensure that the 'condition.config' JSON string is properly cleansed before processing. Since this is not a cloud service, remediation depends on applying the vendor's patch. Check the vendor advisory for the latest patch details and update instructions.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-265m-7826-wjqm
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["Packagist"]
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6a7573c1bf8831d539d945b1
Added to database: 08/07/2026, 05:57:21 UTC
Last enriched: 08/07/2026, 06:12:07 UTC
Last updated: 08/07/2026, 06:12:07 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.