Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as Control Panel admin
-
DeliveryEdit Twig template calling create()
-
ExploitSupply lowercase SplFileObject class name
-
ExecutionBypass case-sensitive blocklist
-
PersistWrite PHP webshell to webroot
-
ImpactExecute arbitrary code as web user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
|
| Exploitation Conditions | Requires the attacker to already possess template-execution rights in Craft CMS - in practice a Control Panel administrator or any account permitted to author/execute Twig templates. The concrete trigger is calling the Twig create() function with a lowercase (or otherwise case-varied) class name such as 'splfileobject' so PHP's case-insensitive class resolution bypasses the blocklist's case-sensitive matching. The key limiting factor is this privilege requirement: despite the official vector's PR:N, exploitation is NOT possible for remote unauthenticated attackers against a default install - the Control Panel must be reachable and the attacker must hold template-authoring capability. No user interaction by a victim is required. Affected: Craft CMS 4.x before 4.18.8 and 5.x before 5.11.0. |
| Impact | This is a privilege-gated remote code execution flaw in Craft CMS, not a mass-exploitable perimeter bug. The provided CVSS 4.0 vector scores 8.7 with PR:N (no privileges required), but this DIRECTLY CONFLICTS with the description, which states exploitation requires 'template-execution rights, such as Control Panel administrators.' The PR:N rating is almost certainly wrong; this should be PR:H (or at minimum PR:L), which materially lowers real-world risk because an attacker must already hold admin-equivalent access. The provided vector also appears to under-count impact: it lists VC:H (confidentiality) only, yet the description describes writing a PHP webshell to the webroot for RCE, which is a clear integrity and availability impact (VI/VA should be H). Exploitation status is 'no public exploit identified at time of analysis' - there is no CISA KEV listing and no POC flag in the supplied data, and no EPSS score was provided to gauge exploitation probability. Net assessment: technically a high-impact RCE (full server compromise via webshell plus .env secret disclosure), but the authentication prerequisite makes it a post-authentication privilege-escalation-to-RCE issue rather than an internet-facing emergency. Priority is high for any deployment where untrusted or lower-trust users can edit/execute Twig templates; lower where Control Panel access is tightly restricted to fully-trusted administrators. |
| Exploit ScenarioDerived | An attacker who already holds Control Panel admin rights (or otherwise can execute Twig templates) calls the Twig create() function with a lowercase class name such as 'splfileobject', which slips past the blocklist's case-sensitive checks because PHP resolves class names case-insensitively. They then use the instantiated SplFileObject to read the application's .env secrets or write a PHP file into the webroot, yielding arbitrary code execution on the server. No public exploit code was identified in the supplied data, though the technique is clearly described in the advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
Privilege-gated remote code execution in Craft CMS 4.x before 4.18.8 and 5.x before 5.11.0 allows users with template-execution rights-such as Control Panel administrators or any account permitted to author or execute Twig templates-to bypass the Twig create() blocklist by supplying case-varied class names such as 'splfileobject'. Successful abuse can instantiate PHP's SplFileObject to read .env secrets or write a PHP file into the webroot, leading to remote code execution. The official CVSS 4.0 vector lists 8.7 with PR:N, but the independent assessment treats this as privilege-gated (CVSS 3.1 PR:H) and not exploitable by remote unauthenticated attackers against a default install; no public exploit was identified at time of analysis.
RemediationAI
Vendor-released patch: upgrade Craft CMS 4.x to 4.18.8 or later and 5.x to 5.11.0 or later; the GitHub security advisory is at https://github.com/craftcms/cms/security/advisories/GHSA-w643-x88w-6wcm and VulnCheck's advisory is at https://www.vulncheck.com/advisories/craft-cms-before-4.18.8-and-5.11.0-twig-create-blocklist-bypass-leading-to-rce. If immediate upgrade is not possible, restrict Control Panel access to trusted networks or administrative users, revoke template-authoring and template-execution permissions from nonessential accounts, and audit Twig templates for dynamic class instantiation via create(), particularly case-varied references to dangerous PHP classes such as SplFileObject. These compensating controls reduce exposure but do not remove the underlying blocklist bypass; restricting Control Panel access can disrupt legitimate administrative workflows, and removing template-authoring rights can limit legitimate content customization.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Craft CMS is a PHP-based content management system that exposes Twig templating to authorized template authors. The flaw is CWE-184 (incomplete list of disallowed inputs): the Twig create() function's blocklist checks class names in a case-sensitive manner, while PHP class resolution is case-insensitive. An attacker who can execute Twig templates can therefore request a blocked class using a lowercase or otherwise case-varied name, such as 'splfileobject' instead of 'SplFileObject', and PHP will resolve it to the intended built-in class. SplFileObject is particularly dangerous in this context because it can read files such as .env to expose secrets and can write attacker-controlled PHP content into the webroot, enabling code execution. The CPE cpe:2.3:a:craftcms:cms:*:*:*:*:*:*:*:* identifies Craft CMS broadly but does not encode the fixed version boundaries; the affected ranges are 4.x before 4.18.8 and 5.x before 5.11.0.
Know when Craft Cms gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Exploitation requires Control Panel/template-execution privileges so PR:H; network-reachable Twig call with low complexity (AV:N/AC:L); webshell write plus secret read gives full C:H/I:H/A:H.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
Craft CMS 4.x before 4.18.8 and 5.x before 5.11.0 contains a blocklist bypass in the Twig create() function because its class-name checks are case-sensitive while PHP class resolution is not. Attackers with template-execution rights, such as Control Panel administrators, can instantiate SplFileObject via a lowercase class name to read .env secrets or write a PHP file into the webroot for remote code execution.
Articles & Coverage 1
Technical POC Analysis
CWE-184 (Incomplete List of Disallowed Inputs), realized as a case-sensitivity mismatch between the blocklist and the language runtime.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Craft CMS deployments running 4.x before 4.18.8 or 5.x before 5.11.0 face a high-severity privilege-gated remote code execution risk that can expose application secrets or allow server-side code placement by users with template-execution rights. The practical exposure is concentrated in over-privileged or compromised Control Panel administrators and template editors, not anonymous internet visitors, so leadership should focus on who can author or execute templates. No public exploit was identified at time of analysis, but because no vendor-released patch was identified, governance over administrative access and template changes is the primary near-term control.
No vendor-released patch identified at time of analysis; restrict template-execution and Control Panel admin rights to a minimal trusted set, remove Twig authoring from non-essential accounts, audit and roll back suspicious template changes, monitor for SplFileObject use and unexpected PHP writes in the webroot, restrict webroot write permissions and PHP execution in content directories, deploy WAF or virtual patching where feasible to block case-varied class-name patterns in template submissions, and rotate secrets if .env access is suspected.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Craft CMS versions 3.x through 5.x contain a critical remote code execution vulnerability (CVSS 10.0) that allows unauth
Craft CMS stores arbitrary content provided by unauthenticated users in session files. Rated medium severity (CVSS 6.9),
Craft CMS is a platform for creating digital experiences. Rated critical severity (CVSS 9.8), this vulnerability is remo
Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond. Rated critical sev
Craft CMS up to v3.7.31 was discovered to contain a SQL injection vulnerability via the GraphQL API endpoint. Rated crit
The SEOmatic component before 3.3.0 for Craft CMS allows Server-Side Template Injection that leads to RCE via malformed
RCE in Craft CMS before 4.17.0-beta.1/5.9.0-beta.1 via template injection for authenticated admins. PoC and patch availa
Authenticated remote code execution in Craft CMS versions 5.0.0-RC1 through 5.8.20 and 4.0.0-RC1 through 4.16.16 lets an
SQL injection in Craft CMS 4.0.0-RC1 through 4.16.17 and 5.0.0-RC1 through 5.8.21 allows authenticated Control Panel use
An issue found in CraftCMS v.3.8.1 allows a remote attacker to execute arbitrary code via a crafted script to the Sectio
Craft CMS through 3.7.36 allows a remote unauthenticated attacker, who knows at least one valid username, to reset the a
Craft CMS 2.6.3000 allows remote attackers to execute arbitrary PHP code by using the "Assets->Upload files" screen and
EUVD-2026-104583
GHSA-f7pv-pv9r-vg93
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB