Craft CMS: Remote code execution in Twig group filter
Summary
Craft CMS 4.x before 4.18.8 and 5.x before 5.11.0 contains a flaw in the Twig group filter, which calls non-string arguments as callables without the validation other filters apply. An authenticated control panel user with access to element-select condition rules can use this to write a webshell to the webroot and execute code as the web server user. The attack requires the Twig sandbox to be enabled (it is disabled by default) and valid control panel credentials.
Affected
- Craft CMS 4.0.0 to before 4.18.8
- Craft CMS 5.0.0 to before 5.11.0
Fixed in
- Craft CMS 4.18.8 (4.x line)
- Craft CMS 5.11.0 (5.x line)
- Use the latest patch release in your line; newer patch releases exist.
Workaround
Unknown. The vendor advisory lists no workaround. Keep enableTwigSandbox disabled if it is not required, and restrict control panel access.
Exploitation
- CISA SSVC: exploitation none, automatable no, technical impact total.
- Not listed in CISA KEV.
- No public proof of concept found; treat as unknown.
- No in-the-wild exploitation reported in the sources reviewed.
Our recommendation
- Inventory all Craft CMS installations and record their exact versions.
- Upgrade to the latest patch in the 4.x or 5.x line.
- Review control panel accounts and remove unused ones.
- Limit control panel access by IP, VPN or SSO and enforce MFA.
- Check web server logs and the webroot for unexpected PHP files.
- Check the installation against the other RCE fixes in 5.11.0.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub Security Advisory GHSA-xmwr-88vw-5ghh github.com
- VulnCheck advisory: Craft CMS authenticated RCE via Twig group filter www.vulncheck.com
- Craft CMS 5.11.0 release notes newreleases.io
- Craft CMS security overview (GitHub) github.com
- Craft CMS CVE-2026-112770 analysis (Pulse) pulse.adyog.com
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:57.
Original description (NVD)
Craft CMS 4.x before 4.18.8 and 5.x before 5.11.0 contains a remote code execution vulnerability in the Twig group filter, which invokes non-string arrow arguments as callables without the checkArrow guard used by other arrow-accepting filters. Authenticated control panel users can pass an array-callable such as FileHelper::writeToFile via element-select condition rules to write a webshell to the webroot and execute code as the web user.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
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.
