CVE-2026-56382: Improper Control of Generation of Code ('Code Injection') in craftcms cms
Craft CMS (composer package craftcms/cms) versions >= 5.5.0 and <= 5.9.13 contain a remote code execution vulnerability in the FieldsController::actionRenderCardPreview() method, which passes the fieldLayoutConfig POST parameter directly to Fields::createLayout() without calling Component::cleanseConfig(). An authenticated admin user can inject Yii2 event handlers (e.g., 'on init' keys) via the fieldLayoutConfig parameter to execute arbitrary PHP code and disclose sensitive information (such as environment variables containing database credentials and CRAFT_SECURITY_KEY). The issue is fixed in version 5.9.14.
AI Analysis
Technical Summary
Craft CMS (composer package craftcms/cms) versions >= 5.5.0 and <= 5.9.13 have a remote code execution vulnerability due to improper control of code generation in the FieldsController::actionRenderCardPreview() method. The vulnerability arises because the fieldLayoutConfig POST parameter is passed directly to Fields::createLayout() without sanitization via Component::cleanseConfig(). An authenticated admin can exploit this by injecting Yii2 event handlers (e.g., 'on init' keys) to execute arbitrary PHP code and access sensitive data such as environment variables containing database credentials and the CRAFT_SECURITY_KEY. The issue is resolved in version 5.9.14.
Potential Impact
An authenticated administrator can exploit this vulnerability to execute arbitrary PHP code remotely, potentially leading to full system compromise. Sensitive information including environment variables with database credentials and security keys can be disclosed, increasing the risk of further attacks or data breaches.
Mitigation Recommendations
Upgrade Craft CMS to version 5.9.14 or later, where this vulnerability is fixed. Since the vulnerability requires authenticated admin access, ensure that admin credentials are protected and monitor for any suspicious activity. Patch status is confirmed fixed in 5.9.14.
CVE-2026-56382: Improper Control of Generation of Code ('Code Injection') in craftcms cms
Description
Craft CMS (composer package craftcms/cms) versions >= 5.5.0 and <= 5.9.13 contain a remote code execution vulnerability in the FieldsController::actionRenderCardPreview() method, which passes the fieldLayoutConfig POST parameter directly to Fields::createLayout() without calling Component::cleanseConfig(). An authenticated admin user can inject Yii2 event handlers (e.g., 'on init' keys) via the fieldLayoutConfig parameter to execute arbitrary PHP code and disclose sensitive information (such as environment variables containing database credentials and CRAFT_SECURITY_KEY). The issue is fixed in version 5.9.14.
CVSS v4.0
Score 8.6high
Affected software
pkg:composer/craftcms/cmsRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Craft CMS (composer package craftcms/cms) versions >= 5.5.0 and <= 5.9.13 have a remote code execution vulnerability due to improper control of code generation in the FieldsController::actionRenderCardPreview() method. The vulnerability arises because the fieldLayoutConfig POST parameter is passed directly to Fields::createLayout() without sanitization via Component::cleanseConfig(). An authenticated admin can exploit this by injecting Yii2 event handlers (e.g., 'on init' keys) to execute arbitrary PHP code and access sensitive data such as environment variables containing database credentials and the CRAFT_SECURITY_KEY. The issue is resolved in version 5.9.14.
Potential Impact
An authenticated administrator can exploit this vulnerability to execute arbitrary PHP code remotely, potentially leading to full system compromise. Sensitive information including environment variables with database credentials and security keys can be disclosed, increasing the risk of further attacks or data breaches.
Mitigation Recommendations
Upgrade Craft CMS to version 5.9.14 or later, where this vulnerability is fixed. Since the vulnerability requires authenticated admin access, ensure that admin credentials are protected and monitor for any suspicious activity. Patch status is confirmed fixed in 5.9.14.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-06-21T02:05:47.495Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a37ed4baaf2dc2701b2275b
Added to database: 06/21/2026, 13:55:23 UTC
Last enriched: 06/28/2026, 21:58:56 UTC
Last updated: 08/05/2026, 12:41:16 UTC
Views: 176
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.