{"id":"CVE-2026-115938","state":"PUBLISHED","title":"Low privilege condition filter escapes Twig sandbox, recovers \"securityKey\" and reaches RCE","description":"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.","publishedAt":"2026-10-23T21:58:51.816Z","updatedAt":"2026-10-23T21:58:51.816Z","severity":{"score":8.7,"label":"High","version":"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","source":"Hackrate"},"assigner":"Hackrate","products":["craftcms cms"],"affected":[{"vendor":"craftcms","product":"cms","packageName":"craftcms/cms","defaultStatus":"unaffected","versions":[{"version":"5.0.0","status":"affected","lessThan":"5.11.2","versionType":"semver"},{"version":"4.0.0","status":"affected","lessThan":"4.18.9","versionType":"semver"}],"collectionURL":"https://packagist.org"}],"references":["https://www.hckrt.com/hacktivity/HCKRT-DRNL9W","https://github.com/craftcms/cms/releases/tag/5.11.2","https://github.com/craftcms/cms","https://github.com/craftcms/cms/security/advisories/GHSA-v4q3-2g5g-wjj6"],"weaknesses":["CWE-1336"],"ingestedAt":"2026-10-29T20:10:43.281Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/115xxx/CVE-2026-115938.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-115938","state":"PUBLISHED","datePublished":"2026-10-23T21:58:51.816Z","dateUpdated":"2026-10-23T21:58:51.816Z","assignerShortName":"Hackrate","assignerOrgId":"7004884b-51e2-48e8-b4a2-5ca29e80453e","dateReserved":"2026-10-23T21:25:32.945Z"},"containers":{"cna":{"title":"Low privilege condition filter escapes Twig sandbox, recovers \"securityKey\" and reaches RCE","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"craftcms","product":"cms","packageName":"craftcms/cms","defaultStatus":"unaffected","versions":[{"version":"5.0.0","status":"affected","lessThan":"5.11.2","versionType":"semver"},{"version":"4.0.0","status":"affected","lessThan":"4.18.9","versionType":"semver"}],"collectionURL":"https://packagist.org"}],"references":[{"url":"https://www.hckrt.com/hacktivity/HCKRT-DRNL9W","tags":["third-party-advisory","technical-description","mitigation"]},{"url":"https://github.com/craftcms/cms/releases/tag/5.11.2","tags":["release-notes"]},{"url":"https://github.com/craftcms/cms","tags":["product"]},{"url":"https://github.com/craftcms/cms/security/advisories/GHSA-v4q3-2g5g-wjj6","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"LOW","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"HIGH","baseScore":8.7,"vectorString":"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"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"version":"3.1","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseSeverity":"HIGH","baseScore":8.8,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1336","lang":"en","description":"CWE-1336 Improper neutralization of special elements used in a template engine","type":"CWE"}]}],"providerMetadata":{"shortName":"Hackrate","orgId":"7004884b-51e2-48e8-b4a2-5ca29e80453e","dateUpdated":"2026-10-23T21:58:51.816Z"},"cpeApplicability":[{"operator":"OR","nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:craftcms:cms:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0.0","versionEndExcluding":"5.11.2"},{"vulnerable":true,"criteria":"cpe:2.3:a:craftcms:cms:*:*:*:*:*:*:*:*","versionStartIncluding":"4.0.0","versionEndExcluding":"4.18.9"}]}]}],"credits":[{"lang":"en","value":"Mohamed Wagdy (@Kalawy)","type":"reporter"},{"lang":"en","value":"Hackrate","type":"coordinator"}],"source":{"advisory":"GHSA-v4q3-2g5g-wjj6","discovery":"UNKNOWN"},"x_generator":{"engine":"Vulnogram 1.0.4"}}}}}