Craft CMS: RCE via missing cleanseConfig in FieldsController::actionRenderCardPreview (CVE-2026-56382)
The `actionRenderCardPreview()` method in `FieldsController` passes the `fieldLayoutConfig` POST parameter directly to `Fields::createLayout()` without calling `Component::cleanseConfig()`. This allows Yii2 event handler injection via `on eventName` keys in the config array, leading to arbitrary code execution. This is the same vulnerability pattern that was fixed in GHSA-4484-8v2f-5748 (same file, `_fldComponent` method correctly uses `cleanseConfig`), GHSA-qx2q-q59v-wf3j (EntryTypesController), and GHSA-2fph-6v5w-89hh (ElementIndexesController). ## PoC As an admin user with a valid session: ``` POST /admin/actions/fields/render-card-preview HTTP/1.1 Content-Type: application/x-www-form-urlencoded Cookie: CraftSessionId=<session> fieldLayoutConfig[on+init]=phpinfo&CRAFT_CSRF_TOKEN=<token> ``` When the FieldLayout object is constructed, Yii2 processes the `on init` key as an event handler registration. During `Component::init()`, the `init` event is triggered, calling `phpinfo()`. The phpinfo output (which includes environment variables, potentially containing database credentials and `CRAFT_SECURITY_KEY`) will appear in the response. ## Impact An authenticated admin can achieve RCE through Yii2 event handler injection. While this requires admin access (same as GHSA-4484-8v2f-5748, which was rated moderate), it allows arbitrary PHP function execution and information disclosure via phpinfo.
AI Analysis
Technical Summary
The actionRenderCardPreview() method in Craft CMS's FieldsController improperly handles the fieldLayoutConfig POST parameter by passing it directly to Fields::createLayout() without invoking Component::cleanseConfig(). This omission permits Yii2 event handler injection through specially crafted 'on eventName' keys in the configuration array, resulting in arbitrary code execution. The vulnerability requires authenticated admin access and mirrors a previously fixed pattern in other parts of the application. A proof-of-concept demonstrates that an attacker can trigger PHP functions like phpinfo() during object initialization, exposing sensitive environment details including database credentials and security keys.
Potential Impact
An attacker with authenticated admin privileges can achieve remote code execution on the affected Craft CMS instance by injecting Yii2 event handlers via the fieldLayoutConfig parameter. This leads to arbitrary PHP function execution and potential disclosure of sensitive environment information, including database credentials and security keys. The vulnerability poses a high risk due to the severity of impact, although it requires high privileges to exploit.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict admin access to trusted users only and monitor for suspicious activity. Avoid exposing the affected endpoint to untrusted networks. Follow vendor updates closely for a security patch addressing this issue.
Craft CMS: RCE via missing cleanseConfig in FieldsController::actionRenderCardPreview (CVE-2026-56382)
Description
The `actionRenderCardPreview()` method in `FieldsController` passes the `fieldLayoutConfig` POST parameter directly to `Fields::createLayout()` without calling `Component::cleanseConfig()`. This allows Yii2 event handler injection via `on eventName` keys in the config array, leading to arbitrary code execution. This is the same vulnerability pattern that was fixed in GHSA-4484-8v2f-5748 (same file, `_fldComponent` method correctly uses `cleanseConfig`), GHSA-qx2q-q59v-wf3j (EntryTypesController), and GHSA-2fph-6v5w-89hh (ElementIndexesController). ## PoC As an admin user with a valid session: ``` POST /admin/actions/fields/render-card-preview HTTP/1.1 Content-Type: application/x-www-form-urlencoded Cookie: CraftSessionId=<session> fieldLayoutConfig[on+init]=phpinfo&CRAFT_CSRF_TOKEN=<token> ``` When the FieldLayout object is constructed, Yii2 processes the `on init` key as an event handler registration. During `Component::init()`, the `init` event is triggered, calling `phpinfo()`. The phpinfo output (which includes environment variables, potentially containing database credentials and `CRAFT_SECURITY_KEY`) will appear in the response. ## Impact An authenticated admin can achieve RCE through Yii2 event handler injection. While this requires admin access (same as GHSA-4484-8v2f-5748, which was rated moderate), it allows arbitrary PHP function execution and information disclosure via phpinfo.
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 actionRenderCardPreview() method in Craft CMS's FieldsController improperly handles the fieldLayoutConfig POST parameter by passing it directly to Fields::createLayout() without invoking Component::cleanseConfig(). This omission permits Yii2 event handler injection through specially crafted 'on eventName' keys in the configuration array, resulting in arbitrary code execution. The vulnerability requires authenticated admin access and mirrors a previously fixed pattern in other parts of the application. A proof-of-concept demonstrates that an attacker can trigger PHP functions like phpinfo() during object initialization, exposing sensitive environment details including database credentials and security keys.
Potential Impact
An attacker with authenticated admin privileges can achieve remote code execution on the affected Craft CMS instance by injecting Yii2 event handlers via the fieldLayoutConfig parameter. This leads to arbitrary PHP function execution and potential disclosure of sensitive environment information, including database credentials and security keys. The vulnerability poses a high risk due to the severity of impact, although it requires high privileges to exploit.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict admin access to trusted users only and monitor for suspicious activity. Avoid exposing the affected endpoint to untrusted networks. Follow vendor updates closely for a security patch addressing this issue.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-86vw-x4ww-x467
- Osv Schema Version
- 1.4.0
- Ecosystems
- ["Packagist"]
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6a50bac868715ace43589282
Added to database: 07/10/2026, 09:26:32 UTC
Last enriched: 07/10/2026, 10:24:14 UTC
Last updated: 09/13/2026, 20:50:05 UTC
Views: 178
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.