Code Injection in Craft CMS - CVE-2026-31857
Published: June 16, 2026
Craft CMS
Detailed vulnerability description
The vulnerability allows a remote user to execute arbitrary code.
The vulnerability exists due to improper neutralization of user-controlled input in BaseElementSelectConditionRule::getElementIds() when processing crafted condition rules through standard element listing endpoints. A remote user can send a specially crafted condition rule to execute arbitrary code.
The issue affects the control panel conditions system and can be exploited by non-admin roles such as Author or Editor.