CVE-2026-33157

Craft CMS: Potential authenticated Remote Code Execution via malicious attached Behavior

Published Mar 24, 2026 CVSS 4.0 · 8.6 High EPSS 1.2% KEV · Not listed
Description
Craft CMS is a content management system (CMS). From version 5.6.0 to before version 5.9.13, a Remote Code Execution (RCE) vulnerability exists in Craft CMS, it can be exploited by any authenticated user with control panel access. This is a bypass of a previous fix. The existing patches add cleanseConfig() to assembleLayoutFromPost() and various FieldsController actions to strip Yii2 behavior/event injection keys ("as" and "on" prefixed keys). However, the fieldLayouts parameter in ElementIndexesController::actionFilterHud() is passed directly to FieldLayout::createFromConfig() without any sanitization, enabling the same behavior injection attack chain. This issue has been patched in version 5.9.13.

Analysis

AI-generated

Technical impact

A flaw in Craft CMS versions 5.6.0 to 5.9.12 permits an authenticated user with control‑panel access to execute arbitrary code on the underlying web server. The issue stems from unsanitized configuration data that allows a malicious "as" key to be injected into the field layout system, causing the CMS to instantiate and run arbitrary PHP code. This results in full remote code execution on the host.

Affected Systems

All installations of Craft CMS running between version 5.6.0 and 5.9.12, inclusive, are vulnerable if they expose a control‑panel interface to users. The flaw was fixed in Craft CMS 5.9.13, which cleanses the fieldLayouts parameter in the ElementIndexesController to prevent the injection of behaviors.

Risk and Exploitability

The CVSS score of 8.6 denotes high severity, while the EPSS score of less than 1% indicates it has not yet been widely observed in the wild and the vulnerability is not listed in CISA’s KEV catalog. However, the attack requires no advanced privileges beyond a normal authenticated user, meaning the potential impact remains significant. Administrators should therefore treat this as a critical issue and apply the patch immediately or otherwise eliminate the use of affected versions.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Craft CMS to version 5.9.13 or later
  • Confirm that all installations run the patched version
  • Restrict control‑panel access to trusted users only
  • Regularly audit field layouts for unexpected changes
  • Monitor logs for suspicious activity related to behavior injection

Generated by OpenCVE AI on March 26, 2026 at 19:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-2fph-6v5w-89hh Craft CMS is Vulnerable to Authenticated Remote Code Execution via Malicious Attached Behavior
History
Type Values Removed Values Added
First Time appeared Craftcms craft Cms
CPEs cpe:2.3:a:craftcms:craft_cms:*:*:*:*:*:*:*:*
Vendors & Products Craftcms craft Cms
Metrics cvssV3_1

{'score': 7.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
First Time appeared Craftcms
Craftcms craftcms
Vendors & Products Craftcms
Craftcms craftcms
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Craft CMS is a content management system (CMS). From version 5.6.0 to before version 5.9.13, a Remote Code Execution (RCE) vulnerability exists in Craft CMS, it can be exploited by any authenticated user with control panel access. This is a bypass of a previous fix. The existing patches add cleanseConfig() to assembleLayoutFromPost() and various FieldsController actions to strip Yii2 behavior/event injection keys ("as" and "on" prefixed keys). However, the fieldLayouts parameter in ElementIndexesController::actionFilterHud() is passed directly to FieldLayout::createFromConfig() without any sanitization, enabling the same behavior injection attack chain. This issue has been patched in version 5.9.13.
Title Craft CMS: Potential authenticated Remote Code Execution via malicious attached Behavior
Weaknesses CWE-470
References
Metrics cvssV4_0

{'score': 8.6, 'vector': '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'}

Weaknesses
  • CWE-470

    Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 25, 2026, 3:56 AM
Reserved
Mar 17, 2026, 9:17 PM
Status
Analyzed
Published
Mar 24, 2026, 6:16 PM
Modified
Jun 17, 2026, 10:37 AM