CVE-2026-31857
highpriority · attend · 45EPSS 0.008 · 58 %ileexploit · PoCEUUSEPSS · scored 2026-10-26
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
exploits (4)
Public proof-of-concept and weaponised exploit code.
- TRX-0/CVE-2026-31857-craftcms-sstiTRX-0/CVE-2026-31857-craftcms-sstiPoC · poc_in_github
affected products (8)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-fp5j-j7j4-mcxcCraftCMS has an RCE vulnerability via relational conditionals in the control panel2026-03-11ghsa · osvUS
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.99 release to mitigate the issue.
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (7)
External citations — patches, advisories, analysis.
- https://github.com/craftcms/cms/commit/8d4903647dcfd31b8d40ed027e27082013347a80cnnvd
- https://github.com/craftcms/cms/releasesPatchcnnvd
- https://github.com/craftcms/cms/security/advisories/GHSA-fp5j-j7j4-mcxccnnvd
- https://github.com/craftcms/cms/commit/8d4903647dcfd31b8d40ed027e27082013347a80enisa_euvd
- https://github.com/craftcms/cms/security/advisories/GHSA-fp5j-j7j4-mcxcenisa_euvd
- https://github.com/craftcms/cms/commit/8d4903647dcfd31b8d40ed027e27082013347a80Patchnvd
- https://github.com/craftcms/cms/security/advisories/GHSA-fp5j-j7j4-mcxcPatchVendor Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan