IT SBIT Services
Schneeberger
DEEN
CVE tracker

Craft CMS: Remote code execution via Twig sandbox escape in Asset::getMimeType

CVE-2026-112772High 8.7

← All vulnerabilities

Summary

Craft CMS versions 5.0.0 up to 5.11.0 (excluding 5.11.0) allow an authenticated Control Panel user to escape the Twig sandbox through the transform handling of Asset::getMimeType. Injected 'as' or 'on' keys are passed unfiltered to Craft::createObject, which attaches attacker-controlled behaviors or event handlers and executes code as the web server user. The attack requires enableTwigSandbox to be set to true (default false) and a valid Control Panel login.

Affected

  • Craft CMS 5.0.0 to before 5.11.0
  • Only installations with enableTwigSandbox=true are reachable according to the advisory research notes; verify in the advisory.

Fixed in

  • Upgrade to Craft CMS 5.11.0 or later.

Workaround

Unknown.

Exploitation

  • No known exploitation reported; CISA SSVC lists exploitation as none and automatable as no.
  • Not listed in CISA KEV; no public proof of concept confirmed.

Our recommendation

  • Upgrade self-hosted Craft CMS 5.x installations to 5.11.0 or later.
  • Restrict Control Panel access via network allowlisting, VPN or SSO and enforce MFA on editor accounts.
  • Review Control Panel user lists and remove unneeded accounts.
  • Check logs for unexpected Control Panel activity and verify the enableTwigSandbox setting.

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, 01:58.

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 via Asset::getMimeType transforms. Attackers can supply 'as' or 'on' keys passed unfiltered to Craft::createObject, attaching malicious behaviors or event handlers that execute code 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.