<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Craftcms — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/craftcms/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Tue, 24 Mar 2026 16:50:42 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/craftcms/feed.xml" rel="self" type="application/rss+xml"/><item><title>Craft CMS Authenticated Remote Code Execution via Malicious Attached Behavior</title><link>https://feed.craftedsignal.io/briefs/2024-01-18-craftcms-rce/</link><pubDate>Tue, 24 Mar 2026 16:50:42 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-18-craftcms-rce/</guid><description>A remote code execution vulnerability exists in Craft CMS versions 5.6.0 through 5.9.12, where any authenticated user with control panel access can exploit the vulnerability by injecting malicious behavior via the `fieldLayouts` parameter in `ElementIndexesController::actionFilterHud()` due to the unsanitized parameter being passed to `FieldLayout::createFromConfig()`.</description><content:encoded><![CDATA[<p>Craft CMS versions 5.6.0 through 5.9.12 are susceptible to a remote code execution (RCE) vulnerability (CVE-2026-33157) that bypasses previous security measures implemented to prevent similar attacks. The vulnerability stems from the <code>ElementIndexesController::actionFilterHud()</code> function, where the <code>fieldLayouts</code> parameter is passed directly to <code>FieldLayout::createFromConfig()</code> without proper sanitization. Any authenticated user with control panel access (<code>accessCp</code> permission) can exploit this flaw by injecting malicious behaviors into the <code>fieldLayouts</code> configuration. This oversight allows attackers to execute arbitrary code on the server, potentially leading to complete system compromise. Defenders need to implement mitigations to detect and prevent exploitation of this vulnerability.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An authenticated user with control panel access crafts a malicious HTTP request.</li>
<li>The request includes a <code>fieldLayouts</code> array with a configuration containing <code>&quot;as &lt;name&gt;&quot;</code> prefixed keys within the request body to the <code>/admin/element-indexes/filter-hud</code> endpoint.</li>
<li><code>ElementIndexesController::actionFilterHud()</code> receives the <code>fieldLayouts</code> parameter.</li>
<li>The <code>fieldLayouts</code> parameter is passed to <code>FieldLayout::createFromConfig($config)</code> without sanitization.</li>
<li><code>FieldLayout::createFromConfig($config)</code> invokes <code>Model::__construct($config)</code>, which processes each key in the configuration.</li>
<li>The <code>&quot;as rce&quot;</code> key triggers <code>Component::__set(&quot;as rce&quot;, $value)</code>, which leads to the instantiation of <code>AttributeTypecastBehavior</code> and its attachment to the FieldLayout via <code>Yii::createObject($value)</code>.</li>
<li>An <code>&quot;on *&quot;</code> key registers a wildcard event handler. Subsequently, <code>parent::__construct()</code> is called followed by <code>init()</code> -&gt; <code>setTabs([])</code> -&gt; <code>getAvailableNativeFields()</code> -&gt; <code>trigger(EVENT_DEFINE_NATIVE_FIELDS)</code>.</li>
<li>The wildcard handler fires, triggering <code>AttributeTypecastBehavior::beforeSave()</code> -&gt; <code>typecastAttributes()</code>. The vulnerability results in <code>$this-&gt;owner-&gt;typecastBeforeSave</code> being resolved via <code>Component::__get()</code> which returns the command string from the behavior&rsquo;s own property, finally reaching <code>call_user_func([ConsoleProcessus::class, 'execute'], $command)</code> -&gt; <code>shell_exec($command)</code> enabling remote code execution.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The vulnerability allows any authenticated user with control panel access to execute arbitrary code on the Craft CMS server. Successful exploitation can lead to complete system compromise, including data theft, modification, or destruction. This RCE vulnerability can have significant impacts on organizations using affected versions of Craft CMS (5.6.0 through 5.9.12).</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Deploy the Sigma rule to detect exploitation attempts by monitoring for HTTP requests to <code>/admin/element-indexes/filter-hud</code> with the <code>fieldLayouts</code> parameter in the request body (see Sigma rule &ldquo;Craft CMS RCE Attempt via ElementIndexesController&rdquo;).</li>
<li>Apply available patches or upgrade to a non-vulnerable version of Craft CMS (versions prior to 5.6.0 or later than 5.9.12).</li>
<li>Restrict access to the control panel to only trusted users with a legitimate need, reducing the attack surface.</li>
<li>Review and audit existing Craft CMS configurations for any suspicious behavior or event injections.</li>
<li>Monitor web server logs for unusual activity related to the <code>ElementIndexesController</code> and <code>FieldLayout</code> components, focusing on POST requests containing potentially malicious configurations (see Sigma rule &ldquo;Craft CMS RCE - AttributeTypecastBehavior&rdquo;).</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>craftcms</category><category>rce</category><category>vulnerability</category><category>webserver</category></item></channel></rss>