CVE-2026-31857
JSON

8.1high

CraftCMS has an RCE vulnerability via relational conditionals in the control panel

Severity
8.1high CVSS:4.0 by GitHub_M
Exploit likelihood
1.12% (higher than 67% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-fp5j-j7j4-mcxc

Description

Craft is a content management system (CMS). Prior to 5.9.9 and 4.17.4, a Remote Code Execution vulnerability exists in the Craft CMS 5 conditions system. The BaseElementSelectConditionRule::getElementIds() method passes user-controlled string input through renderObjectTemplate() -- an unsandboxed Twig rendering function with escaping disabled. Any authenticated Control Panel user (including non-admin roles such as Author or Editor) can achieve full RCE by sending a crafted condition rule via standard element listing endpoints. This vulnerability requires no admin privileges, no special permissions beyond basic control panel access, and bypasses all production hardening settings (allowAdminChanges: false, devMode: false, enableTwigSandbox: true). Users should update to the patched 5.9.9 or 4.17.4 release to mitigate the issue.

Affected

Product or packageVersionsReported by
craftcms cms>= 5.0.0-RC1, < 5.9.9, >= 4.0.0-beta.1, < 4.17.4CVE List
craftcms/cms (Packagist)from 5.0.0-RC1 before 5.9.9, from 4.0.0-beta.1 before 4.17.4GitHub Advisory Database
craftcms craft_cmsfrom 4.0.0.1 before 4.17.4, from 5.0.1 before 5.9.9, 4.0.0, 5.0.0NVD

All scores

GitHub_M8.1high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-94

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

Craft is a content management system (CMS). Prior to 5.9.9 and 4.17.4, a Remote Code Execution vulnerability exists in the Craft CMS 5 conditions system. The BaseElementSelectConditionRule::getElementIds() method passes user-controlled string input through renderObjectTemplate() -- an unsandboxed Twig rendering function with escaping disabled. Any authenticated Control Panel user (including non-admin roles such as Author or Editor) can achieve full RCE by sending a crafted condition rule via standard element listing endpoints. This vulnerability requires no admin privileges, no special permissions beyond basic control panel access, and bypasses all production hardening settings (allowAdminChanges: false, devMode: false, enableTwigSandbox: true). Users should update to the patched 5.9.9 or 4.17.4 release to mitigate the issue.

GitHub Advisory Database

A Remote Code Execution vulnerability exists in the Craft CMS 5 conditions system.

The BaseElementSelectConditionRule::getElementIds() method passes user-controlled string input through renderObjectTemplate() -- an unsandboxed Twig rendering function with escaping disabled.

Any authenticated Control Panel user (including non-admin roles such as Author or Editor) can achieve full RCE by sending a crafted condition rule via standard element listing endpoints.

This vulnerability requires no admin privileges, no special permissions beyond basic control panel access, and bypasses all production hardening settings (allowAdminChanges: false, devMode: false, enableTwigSandbox: true).

Users should update to the patched 5.99 release to mitigate the issue.

NVD (es)

Craft es un sistema de gestión de contenido (CMS). Antes de 5.9.9 y 4.17.4, existe una vulnerabilidad de ejecución remota de código en el sistema de condiciones de Craft CMS 5. El método BaseElementSelectConditionRule::getElementIds() pasa una entrada de cadena controlada por el usuario a través de renderObjectTemplate() -- una función de renderizado de Twig sin 'sandbox' con el escape deshabilitado. Cualquier usuario autenticado del Panel de Control (incluyendo roles no administrativos como Autor o Editor) puede lograr RCE completa enviando una regla de condición especialmente diseñada a través de los puntos finales estándar de listado de elementos. Esta vulnerabilidad no requiere privilegios de administrador, ni permisos especiales más allá del acceso básico al panel de control, y elude todas las configuraciones de endurecimiento de producción (allowAdminChanges: false, devMode: false, enableTwigSandbox: true). Los usuarios deben actualizar a la versión parcheada 5.9.9 o 4.17.4 para mitigar el problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-31857 changed 2026-03-12CVE Terms of Use
GitHub Advisory DatabaseGHSA-fp5j-j7j4-mcxc changed 2026-03-13CC-BY-4.0
NVDCVE-2026-31857 changed 2026-06-17Public domain