CVE-2026-112770: Improper Control of Generation of Code ('Code Injection') in craftcms cms
Description
Craft CMS versions 4.x before 4.18.8 and 5.x before 5.11.0 have a remote code execution vulnerability in the Twig group filter. Authenticated control panel users can exploit this flaw by passing array-callable arguments, such as FileHelper::writeToFile, to write a webshell to the webroot and execute arbitrary code as the web user. This vulnerability arises because the filter invokes non-string arrow arguments as callables without proper safeguards.
CVSS v4.0
Score 8.7high
Affected software
craftcms
cms
craftcms
cms
pkg:github/craftcms/cmsRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-112770 is a remote code execution vulnerability affecting Craft CMS 4.x versions prior to 4.18.8 and 5.x versions prior to 5.11.0. The issue exists in the Twig group filter, which improperly invokes non-string arrow arguments as callables without the checkArrow guard used by other arrow-accepting filters. Authenticated users with control panel access can exploit this by passing an array-callable, such as FileHelper::writeToFile, via element-select condition rules. This allows them to write a webshell to the webroot and execute arbitrary code with the privileges of the web user.
Potential Impact
An authenticated control panel user can achieve remote code execution on the affected Craft CMS installations. This enables the attacker to write files to the webroot and execute arbitrary code as the web server user, potentially leading to full system compromise depending on the server configuration and privileges.
Mitigation Recommendations
A fix is available in Craft CMS versions 4.18.8 and later, and 5.11.0 and later. Users should upgrade to these versions to remediate the vulnerability. No additional mitigation steps are indicated by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-10-19T18:10:49.940Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ad670ea2cdf04f65685174b
Added to database: 10/19/2026, 19:35:06 UTC
Last enriched: 10/19/2026, 19:48:50 UTC
Last updated: 10/19/2026, 22:27:00 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.