CVE-2026-31857HIGH 8.8EPSS p46.9%

CVE-2026-31857CVE-2026-31857

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.

Scoring

CVSS 3.18.8 (HIGH)
VectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS0.66% probability of exploitation · percentile 46.9% · 2026-06-18T12:00:27Z
Published2026-03-11
Last modified2026-03-17

Underlying weaknesses· 1

CWE-94

References

  1. https://github.com/craftcms/cms/commit/8d4903647dcfd31b8d40ed027e27082013347a80
  2. https://github.com/craftcms/cms/security/advisories/GHSA-fp5j-j7j4-mcxc

1

TypeTargetConfidenceTier
WeaknessImproper Control of Generation of Code ('Code Injection')cwe-940%live

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CVE
CVE-2025-68454
CVE
CVE-2026-28697
CVE
CVE-2026-28783
CVE
CVE-2026-31858
CVE
Craft CMS Code Injection Vulnerability
CVE
CVE-2025-54417
Sourced from NVD + FIRST.org EPSS. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.