Loading advisory.
Loading advisory.
Craft CMS is Vulnerable to Authenticated Remote Code Execution via Malicious Attached Behavior
A Remote Code Execution (RCE) vulnerability exists in Craft CMS 5.x and 4.x that bypasses the security fixes for GHSA-7jx7-3846-m7w7 and GHSA-255j-qw47-wjh5. This vulnerability can be exploited by any authenticated user with control panel access.
Published 2026-03-24 16:50 UTC · Modified 2026-03-25 21:16 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score.
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| craftcms/cms | Packagist | >= 5.6.0, < 5.9.13 versions 5.6.0, 5.6.0.1, 5.6.0.2, 5.6.1, 5.6.10, 5.6.10.1, 5.6.10.2, 5.6.11, 5.6.12, 5.6.13, 5.6.14, 5.6.15, 5.6.16, 5.6.17, 5.6.2, 5.6.3, 5.6.4, 5.6.5, 5.6.5.1, 5.6.6 and 62 more | 5.9.13 | composer require 'craftcms/cms:>=5.9.13' |
A Remote Code Execution (RCE) vulnerability exists in Craft CMS 5.x and 4.x that bypasses the security fixes for GHSA-7jx7-3846-m7w7 and GHSA-255j-qw47-wjh5. This vulnerability can be exploited by any authenticated user with control panel access.
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.
Attack Type: Remote Code Execution (RCE)
Authentication Required: Authenticated user with control panel access (accessCp permission)
In ElementIndexesController::actionFilterHud() (line 493-494), the fieldLayouts body parameter is passed to FieldLayout::createFromConfig() without cleanseConfig():
// ElementIndexesController.php:485-494
if ($conditionConfig) {
$conditionConfig = Component::cleanseConfig($conditionConfig); // conditionConfig IS cleansed
$condition = $conditionsService->createCondition($conditionConfig);
} else {
$condition = $this->elementType()::createCondition();
}
if (!empty($fieldLayouts)) {
// fieldLayouts is NOT cleansed!
$condition->setFieldLayouts(array_map(
fn(array $config) => FieldLayout::createFromConfig($config),
$fieldLayouts
));
}Note the inconsistency: conditionConfig is sanitized with cleanseConfig(), but fieldLayouts is not.
Send a fieldLayouts array containing config with "as <name>" prefixed keys
FieldLayout::createFromConfig($config) -> new self($config) -> Model::__construct($config)
App::configure($this, $config) processes each key
"as rce" key -> Component::__set("as rce", $value) -> Yii::createObject($value) -> instantiates AttributeTypecastBehavior and attaches it to the FieldLayout
"on *" key -> registers a wildcard event handler
parent::__construct() -> init() -> setTabs([]) -> getAvailableNativeFields() -> trigger(EVENT_DEFINE_NATIVE_FIELDS)
The wildcard handler fires -> AttributeTypecastBehavior::beforeSave() -> typecastAttributes()
$this->owner->typecastBeforeSave -> resolved via Component::__get() -> returns the command string from the behavior's own property
call_user_func([ConsoleProcessus::class, 'execute'], $command) -> shell_exec($command)
A user account with control panel access
Exploit code or a detection template for this CVE is published by the sources below. This is not a report of use against real systems (that is what CISA KEV records) and it does not change the tier.
EPSS went from 0.012 on 2026-11-24 to 0.014 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.012 | first score | v2026.06.15 |
| 2026-11-26 | 0.014 | 0.012 | v2026.06.15 |