CVE-2026-31857Craftcms Craft Cms
High 8.1 No auth needed
Follow: this CVE · Craftcms · Craftcms Craft Cms We alert you by email or Slack (account required).
- Priority
- 64
- CVSS 4.0
- 8.1
- EPSS
- —
- Auth required
- No
- Published
- Mar 11, 2026
- Updated
- Jun 17, 2026
- Category
- Web application · Cross-platform
- Weakness (CWE)
- CWE-94
- SSVC (CISA)
- Exploitation: none · Automatable: yes · Technical impact: total
- Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
What happens
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.
What to do
- Apply the vendor's security update for Craft Cms.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Packagist | craftcms/cms |
≥ 5.0.0-RC1 < 5.9.9 |
5.9.9 |
composer require "craftcms/cms:^5.9.9" |
| Packagist | craftcms/cms |
≥ 4.0.0-beta.1 < 4.17.4 |
4.17.4 |
composer require "craftcms/cms:^4.17.4" |
Per OSV / GitHub Advisories (GHSA-fp5j-j7j4-mcxc). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| craftcms | craft_cms | ≥ 4.0.0.1 < 4.17.4 |
| craftcms | craft_cms | ≥ 5.0.1 < 5.9.9 |
| craftcms | craft_cms | 4.0.0 |
| craftcms | craft_cms | 4.0.0 |
| craftcms | craft_cms | 4.0.0 |
| craftcms | craft_cms | 4.0.0 |
| craftcms | craft_cms | 4.0.0 |
| craftcms | craft_cms | 4.0.0 |
| craftcms | craft_cms | 4.0.0 |
| craftcms | craft_cms | 4.0.0 |
| craftcms | craft_cms | 5.0.0 |
| craftcms | craft_cms | 5.0.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Patch Vendor Advisory