IT SBIT Services
Schneeberger
DEEN
CVE tracker

Craft CMS: Remote code execution via Twig sandbox escape

CVE-2026-112773High 8.7

← All vulnerabilities

Summary

Craft CMS from 5.0.0 before 5.11.0 allows authenticated Control Panel users to escape the Twig sandbox through the getNext, getPrev and getOwners element methods. An attacker can inject Yii behavior or event handler configuration that runs code when the element query executes, which results in code execution as the web user. The sandbox must be enabled (enableTwigSandbox, default off) for the attack to be possible.

Affected

  • Craft CMS 5.0.0 to before 5.11.0
  • Craft CMS sites with enableTwigSandbox set to true and Control Panel accounts with access to the affected features

Fixed in

  • Craft CMS 5.11.0 (according to the CVE record and the affected range; not yet confirmed in the vendor advisory)

Workaround

Unknown.

  • Keep enableTwigSandbox disabled if it is not required (vendor advisory not verified)

Exploitation

  • Authentication with Control Panel access is required.
  • CISA KEV: not listed.
  • CISA SSVC: exploitation none, automatable no, technical impact total.
  • No public proof of concept found for this CVE: Unknown.

Our recommendation

  • Upgrade Craft CMS to 5.11.0 or later, after taking a backup.
  • Limit Control Panel accounts to trusted staff and remove unused accounts.
  • Enforce MFA on Control Panel logins and restrict Control Panel access by IP where feasible.
  • Check whether enableTwigSandbox is enabled and review Control Panel user activity for anomalies.
  • Prioritise sites with external Control Panel access or several untrusted editors.

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 02:00.

Original description (NVD)

Craft CMS from 5.0.0 before 5.11.0 contains a remote code execution vulnerability that allows authenticated Control Panel users to escape the Twig sandbox by passing uncleansed criteria to getNext, getPrev, or getOwners. Attackers can inject Yii "as" or "on" config keys to attach malicious event handlers that execute when the element query runs, achieving code execution as the web user.

NVD references (2)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.