Read the docs

Sandbox escape in Craft CMS lets control panel users reach RCE

Priority MEDIUM 40CWE-1336Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Attack requirements
None
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-1336.

Summary

Craft CMS versions from 5.0.0 before 5.11.2 and from 4.0.0 before 4.18.9 let an authenticated control panel user escape the Twig sandbox through an element-search condition filter. The filter's property lookup runs outside Twig's security policy, so repeated lookups reach the secret key, GeneralConfig::securityKey (CWE-1336 Improper Neutralization of Special Elements Used in a Template Engine). A user with control panel access can recover the key character by character and then sign parameters that reach unsandboxed template rendering, where native PHP callables can run.

Written with Claude Haiku 5.5 from the sources below · 2026-11-02

Description from the CNA

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. 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 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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00369 30th percentileScored 2026-11-07
Fix Fixed cms (craftcms): 5.11.2, 4.18.9

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
Craft CMScms5.0.0 to before 5.11.2; 4.0.0 to before 4.18.95.11.2, 4.18.9Patch availableCNA
  • cms VendorCraft CMS Affected 5.0.0 to before 5.11.2; 4.0.0 to before 4.18.9 Fixed in 5.11.2, 4.18.9 Patch available CNA

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:craftcms:craft_cms:*:*:*:*:*:*:*:*——Craft CMS
  • cpe:2.3:a:craftcms:craft_cms:*:*:*:*:*:*:*:* Versions — — ·Craft CMS

Remediation

Update Craft CMS 5 to version 5.11.2 and Craft CMS 4 to version 4.18.9.

Written with Claude Haiku 5.5 from the sources below · 2026-11-02

  • Fix · CNA cms (craftcms) Fixed in 5.11.2, 4.18.9

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    craftcms cms 4.18.9, 5.11.2

    2 records Highest priority Priority MEDIUM 2 MEDIUM

    Other records, highest priority first

    • TI-2026-80006 Craft CMS control panel users can replace security key and run codePriority MEDIUM 40

Timeline

  1. 2026-10-23 Threatist record created from CVE-2026-115938
  2. 2026-10-24 Alias added: GHSA-gg4p-9c93-5hfp
  3. 2026-10-24 Priority changed: MEDIUM → LOW
  4. 2026-10-25 EPSS moved to the below the 50th percentile
  5. 2026-11-02 CISA SSVC decision points changed
  6. 2026-11-02 Priority changed: LOW → MEDIUM

References

  • TI-2025-23503 Craft CMS Allows Remote Code Execution KEVCVSS 3.1CRITICAL 10.0
  • TI-2024-37138 RCE when PHP `register_argc_argv` config setting is enabled in craftcms/cms KEVCVSS 4.0CRITICAL 9.3
  • TI-2025-16994 Potential RCE with a compromised security key in craft/cms KEVCVSS 3.1HIGH 8.1
  • TI-2025-24595 Craft CMS stores user-provided content in session files KEVCVSS 4.0MEDIUM 6.9
  • TI-2023-22284 Craft CMS Remote Code Execution vulnerability CVSS 3.1CRITICAL 10.0
  • TI-2024-25171 Craft CMS up to v3.7.31 was discovered to contain a SQL injection vulnerability via the GraphQL API endpoint. CVSS 3.1CRITICAL 9.8
See all 203 →

Sources