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
Resolved
TargetTier 1
craftcms/cms
Severity
High
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
Kalawy

Created.

Tuesday, September 8, 2026 6:24 PM
Tyrell

Severity changed from Critical to High

Thursday, September 10, 2026 3:08 PM
Tyrell

Changed to Accepted (Open)

Thursday, September 10, 2026 3:10 PM
brandonkelly

Github Security Advisory has been created. GHSA-v4q3-2g5g-wjj6

Tuesday, September 15, 2026 6:11 PM
angrybrad

Changed to Resolved (Closed).

https://github.com/craftcms/cms/security/advisories/GHSA-v4q3-2g5g-wjj6 has been created for this and will be made public on October 19th. Thanks for the report!

Thursday, September 17, 2026 9:05 PM
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

Checking service status...

Hackrate Ethical Hacking Platform |
2026 ©

CVE Program Numbering Authority