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: 8.7 [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]
CVE-ID: CVE-2026-31857
CWE-ID: CWE-94
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

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.


Affected software

Craft CMS

How to mitigate CVE-2026-31857

Install security update from vendor's website.

Craft CMS - addressed in versions 4.17.4, 5.9.9

External References

Related Security Bulletins