Code Injection in Craft CMS - CVE-2026-31857

 

Code Injection in Craft CMS - CVE-2026-31857

Published: June 16, 2026


Vulnerability identifier: #VU134659
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2026-31857
CWE-ID: CWE-94
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Pixel & Tonic, Inc.
Affected software:
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.


How to mitigate CVE-2026-31857

Install security update from vendor's website.

Sources