{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-31857","id":"CVE-2026-31857","title":"CraftCMS has an RCE vulnerability via relational conditionals in the control panel","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-ad","descriptionLong":"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.","published":"2026-03-11T17:30:29.092Z","updated":"2026-10-28T02:30:43.547809670Z","reserved":"2026-03-09T19:02:25.011Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"4.0","score":8.1,"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","rating":"high","source":"GitHub_M"},"metrics":[{"version":"4.0","score":8.1,"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","rating":"high","source":"GitHub_M"},{"version":"4.0","score":8.1,"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","rating":"high","source":"github.com"},{"version":"4.0","score":null,"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","rating":"unrated","source":"OSV"},{"version":"4.0","score":null,"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","rating":"high","source":"GitHub"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"}],"rating":"high","products":["craftcms cms"],"affectedProducts":[{"vendor":"craftcms","product":"cms","defaultStatus":null,"versions":[{"version":">= 5.0.0-RC1, < 5.9.9","status":"affected"},{"version":">= 4.0.0-beta.1, < 4.17.4","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"craftcms/cms","purl":"pkg:composer/craftcms/cms","ranges":[">=5.0.0-RC1 <5.9.9",">=4.0.0-beta.1 <4.17.4"],"fixed":["5.9.9","4.17.4"],"advisory":"GHSA-fp5j-j7j4-mcxc"}],"cwes":["CWE-94"],"aliases":["GHSA-fp5j-j7j4-mcxc"],"references":[{"url":"https://github.com/craftcms/cms/security/advisories/GHSA-fp5j-j7j4-mcxc","tags":["x_refsource_CONFIRM","Patch","Vendor Advisory","advisory","web"]},{"url":"https://github.com/craftcms/cms/commit/8d4903647dcfd31b8d40ed027e27082013347a80","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31857.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31857","tags":["advisory"]},{"url":"https://github.com/craftcms/cms","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total"},"epss":0.01119,"epssPercentile":0.66933,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-31857","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31857","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-31857","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-fp5j-j7j4-mcxc","ok":true,"note":"GHSA-fp5j-j7j4-mcxc"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-31857","ok":true,"note":"scored 2026-11-20"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}