Low privilege condition filter escapes Twig sandbox, recovers "securityKey" and reaches RCE
Report #HCKRT-DRNL9W in Craft CMS Private Bug Bounty Program
Disclosed Report
StatusClosed
TargetTier 1
Severity
Details
- Program
- Craft CMS Private Bug Bounty Program
- Target
- craftcms/cms
- Creation Date
- 9/8/2026 6:24:09 PM
- Severity
- High
- CVSS Score
-
None
- CVE Number
- CVE-2026-115938
- Affected versions
- >= 4.0.0, < 4.18.9 and >= 5.0.0, < 5.11.2
- Visibility
- Disclosed
- Disclosed at
- 10/23/2026 9:53:22 PM
- Author
- @Kalawy
- Status
- Resolved (Closed)
- Vulnerability Type (CAPEC™)
- Weakness (CWE)
- (CWE-20) Improper Input Validation
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.
Description
The 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.
After recovering GeneralConfigsecurityKey, the same user can compute Craft’s generic HMAC wire format offline. Signed parameters such as redirect are then accepted and passed to unsandboxed ViewrenderObjectTemplate(), 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.
Impact
Successful exploitation escapes the intended template security authority and executes attacker-selected PHP callables as the web server user.
Timeline
Hackrate
Our platform helps companies to identify software vulnerabilities in a cost-efficient way. It provides a secure and centralized view of ethical hacking projects for your company.
US Patent Applied for HackGATE #63/645,845
Products
From the Blog
-
Hackrate Ranked 1st in Hungary and 22nd Globally at Hack The Box’s Global Cyber Skills Benchmark 2026
May 29 • 13 min read
-
Press release: Hackrate becomes Hungary’s first CVE Numbering Authority
Jan 13 • 5 min read ★
-
Let 2026 be the year bug bounty becomes part of how you build and operate
Jan 05 • 4 min read