Skip to content
OpenAdvisories
High · 8.1 Public exploit CVE-2026-31857 EUVD-2026-11257GHSA-fp5j-j7j4-mcxc

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

Published Mar 11, 2026 · Updated Mar 12, 2026 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
craftcms cms >= 5.0.0-RC1, < 5.9.9, >= 4.0.0-beta.1, < 4.17.4 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 5 repositories

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
Packagist craftcms/cms >= 5.0.0-RC1, < 5.9.9 5.9.9 GHSA-fp5j-j7j4-mcxc
Packagist craftcms/cms >= 4.0.0-beta.1, < 4.17.4 4.17.4 GHSA-fp5j-j7j4-mcxc

References