{"id":"CVE-2026-115938","aliases":["CVE-2026-115938"],"related":[],"kind":"vulnerability","state":"published","title":"Low privilege condition filter escapes Twig sandbox, recovers \"securityKey\" and reaches RCE","summary":"Craft CMS allows any authenticated control panel user to submit an element-search condition whose element selector is evaluated as a sandboxed Twig object template. Craft’s allowed column filter delegates property lookup to Yii ArrayHelper, outside Twig’s SecurityPolicy. Repeated single-segment lookups therefore bypass the sandbox’s empty property/method allowlists.\n\n\n\nThe vulnerable condition value is ultimately cast to an integer. That does not protect the secret: the template can return author ID 1 when a guessed key character is correct and an impossible ID otherwise. The JSON endpoint returns entries for the first case and an empty array for the second, forming a stable remote character oracle.\n\n\n\nAfter recovering GeneralConfig::securityKey, the same user can compute Craft’s generic HMAC wire format offline. Signed parameters such as redirect are then accepted and passed to unsandboxed View::renderObjectTemplate(), where Twig’s string-callable form can invoke native PHP callables. The regression proof uses the harmless substr() callback and observes abcdef becoming cdef; it does not execute an OS command.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Craft CMS allows any authenticated control panel user to submit an element-search condition whose element selector is evaluated as a sandboxed Twig object template. Craft’s allowed column filter delegates property lookup to Yii ArrayHelper, outside Twig’s SecurityPolicy. Repeated single-segment lookups therefore bypass the sandbox’s empty property/method allowlists.\n\n\n\nThe vulnerable condition value is ultimately cast to an integer. That does not protect the secret: the template can return author ID 1 when a guessed key character is correct and an impossible ID otherwise. The JSON endpoint returns entries for the first case and an empty array for the second, forming a stable remote character oracle.\n\n\n\nAfter recovering GeneralConfig::securityKey, the same user can compute Craft’s generic HMAC wire format offline. Signed parameters such as redirect are then accepted and passed to unsandboxed View::renderObjectTemplate(), where Twig’s string-callable form can invoke native PHP callables. The regression proof uses the harmless substr() callback and observes abcdef becoming cdef; it does not execute an OS command.","source":"cvelist"}],"published":"2026-10-23T21:58:51.816Z","modified":"2026-11-02T16:17:29.370Z","severity":{"scorer":"Hackrate","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"Hackrate","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"Hackrate","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-1336"],"affected":[{"ranges":[{"type":"semver","introduced":"5.0.0","fixed":"5.11.2","status":"affected"},{"type":"semver","introduced":"4.0.0","fixed":"4.18.9","status":"affected"}],"vendor":"craftcms","product":"cms","package":"craftcms/cms","source":"cvelist"}],"references":[{"url":"https://www.hckrt.com/hacktivity/HCKRT-DRNL9W","tags":["mitigation","technical-description","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/craftcms/cms/releases/tag/5.11.2","tags":["release-notes"],"sources":["cvelist","nvd"]},{"url":"https://github.com/craftcms/cms","tags":["product"],"sources":["cvelist","nvd"]},{"url":"https://github.com/craftcms/cms/security/advisories/GHSA-v4q3-2g5g-wjj6","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":["Mohamed Wagdy (@Kalawy)","Hackrate"],"assigner":"Hackrate","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-11-02T15:02:44.482Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-115938","url":"https://www.cve.org/CVERecord?id=CVE-2026-115938","licence":"CVE Terms of Use","modified":"2026-11-02T15:03:03.061Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-115938","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-115938","licence":"Public domain","modified":"2026-11-02T16:17:29.370Z"}],"updatedAt":"2026-11-25T22:59:47.019Z","epss":{"score":0.00462,"percentile":0.41778,"date":"2026-12-01T12:00:22.000Z"}}