CVE-2026-56382
Received Received - Intake
Remote Code Execution in Craft CMS

Publication date: 2026-06-21

Last updated on: 2026-06-21

Assigner: VulnCheck

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 Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-21
Last Modified
2026-06-21
Generated
2026-06-21
AI Q&A
2026-06-21
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
craftcms cms From 5.5.0 (inc) to 5.9.13 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Compliance Impact

This vulnerability allows an authenticated admin user to execute arbitrary PHP code and disclose sensitive information such as environment variables containing database credentials and the CRAFT_SECURITY_KEY.

Exposure of sensitive data like database credentials and security keys can lead to unauthorized access and data breaches, which may impact compliance with data protection regulations such as GDPR and HIPAA.

Organizations using affected versions of Craft CMS should update to version 5.9.14 to mitigate the risk and maintain compliance with these standards.

Executive Summary

CVE-2026-56382 is a remote code execution vulnerability in Craft CMS versions 5.5.0 through 5.9.13. It occurs in the FieldsController::actionRenderCardPreview() method, where the fieldLayoutConfig POST parameter is passed directly to Fields::createLayout() without proper sanitization.

An authenticated admin user can exploit this flaw by injecting Yii2 event handlers (such as 'on init' keys) via the fieldLayoutConfig parameter, which allows execution of arbitrary PHP code.

This can lead to the disclosure of sensitive information, including environment variables that contain database credentials and the CRAFT_SECURITY_KEY.

The vulnerability was fixed in Craft CMS version 5.9.14.

Impact Analysis

This vulnerability can have severe impacts if exploited. An attacker with authenticated admin access can execute arbitrary PHP code on the server.

Such code execution can lead to unauthorized control over the application and server environment.

Additionally, sensitive information such as database credentials and security keys can be disclosed, potentially compromising the entire system.

Detection Guidance

This vulnerability involves an authenticated admin user exploiting the fieldLayoutConfig POST parameter to inject Yii2 event handlers for remote code execution. Detection would involve monitoring for unusual POST requests to the FieldsController::actionRenderCardPreview() endpoint containing suspicious keys such as 'on init' or other Yii2 event handler patterns within the fieldLayoutConfig parameter.

Since the vulnerability requires authenticated admin access, reviewing web server logs for POST requests to the relevant endpoint from admin users with unusual payloads is recommended.

Specific commands are not provided in the resources, but general approaches include:

  • Using web server or application logs to search for POST requests containing 'fieldLayoutConfig' with suspicious keys like 'on init'.
  • Using tools like grep or similar to scan logs, e.g., `grep -i 'fieldLayoutConfig' /path/to/access.log | grep -i 'on init'`.
  • Monitoring for unexpected PHP code execution or unusual environment variable disclosures in the application logs.
Mitigation Strategies

The primary mitigation step is to upgrade Craft CMS to version 5.9.14 or later, where this vulnerability has been fixed.

Until the upgrade can be applied, restrict authenticated admin access to trusted users only and monitor for suspicious activity involving the fieldLayoutConfig parameter.

Additionally, consider implementing web application firewall (WAF) rules to detect and block POST requests containing suspicious Yii2 event handler keys such as 'on init' in the fieldLayoutConfig parameter.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-56382. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart