Arbitrary Code Injection Affecting craftcms/cms package, versions >=4.0.0-beta.1, <4.17.4>=5.0.0-beta.1, <5.9.9


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.1% (29th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-CRAFTCMSCMS-15460789
  • published11 Mar 2026
  • disclosed11 Mar 2026
  • creditChris Alupului

Introduced: 11 Mar 2026

NewCVE-2026-31857  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade craftcms/cms to version 4.17.4, 5.9.9 or higher.

Overview

craftcms/cms is a content management system.

Affected versions of this package are vulnerable to Arbitrary Code Injection via the BaseElementSelectConditionRule::getElementIds function. An attacker can execute arbitrary code by sending a crafted condition rule through standard element listing endpoints. This is only exploitable if the attacker has authenticated access to the control panel, regardless of privilege level, and even if production hardening settings are enabled.

References

CVSS Base Scores

version 4.0
version 3.1