High severity · published Mar 11, 2026
CVE-2026-31857
CraftCMS has an RCE vulnerability via relational conditionals in the control panel
8.8
CVSS
0.8%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.8% · higher than 58% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
CM
cms · craftcms
>= 5.0.0-RC1, < 5.9.9; >= 4.0.0-beta.1, < 4.17.4 · source: vendor
CC
Craft Cms · Craftcms
4.0.0.1 before 4.17.4; 5.0.1 before 5.9.9; 4.0.0; 4.0.0; 4.0.0; 4.0.0; +6 more · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-31857
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-31857
Patch
https://github.com/craftcms/cms/commit/8d4903647dcfd31b8d40ed027e27082013347a80
Patch
https://github.com/craftcms/cms/security/advisories/GHSA-fp5j-j7j4-mcxc
More from cms
10.0
CVE-2025-32432
Craft CMS Allows Remote Code Execution
9.8
CVE-2024-56145
RCE when PHP `register_argc_argv` config setting is enabled in craftcms/cms
8.1
CVE-2025-23209
Potential RCE with a compromised security key in craft/cms
9.8
CVE-2026-112776
Craft CMS 5.0.0 before 5.11.0 GraphQL Site-Scope Bypass via Mutations
9.8
CVE-2026-84795
Craft CMS before 5.10.11 Authentication Bypass via Admin Flag Inheritance
