Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.5%top 60%

CVE-2026-56382: Improper Control of Generation of Code ('Code Injection') in craftcms cms

0
High
VulnerabilityCVE-2026-56382cvecve-2026-56382
Published: 06/21/2026 (06/21/2026, 13:26:58 UTC)
Source: CVE Database V5
Vendor/Project: craftcms
Product: 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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
High
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected software

Packagistmore threats →ai
craftcms/cms
pkg:composer/craftcms/cms
Affected versions
=5.5.0<=5.9.13 >=5.5.0

Run 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

AILast updated: 06/28/2026, 21:58:56 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses