Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to control panel with low-privilege account
-
DeliveryAccess Twig template editor
-
ExploitCraft payload using yii\base\Component function-call gadget
-
ExecutionSubmit template for sandbox rendering
-
PersistAllowlist check passes via ElementInterface hierarchy
-
ImpactExecute arbitrary PHP as web server process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V15 - Secure Coding and Architecture Protection mechanism completeness
|
| Exploitation Conditions | Exploitation requires two concrete prerequisites: (1) an authenticated Craft CMS control panel session - anonymous front-end site visitors cannot trigger this; and (2) the account must hold permission to render or save Twig templates within the control panel, which is not granted to all panel roles. The vulnerability is present regardless of whether |
| Impact | The CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H) is well-calibrated: the attack is network-accessible, requires no interaction, and yields full system-level impact. The primary risk-limiting signal is PR:L - exploitation requires an authenticated control panel session with template-editing permissions, which is not granted to anonymous visitors or standard site users. There is no EPSS score in the available source data; however, the recurrence of the exact same |
| Exploit ScenarioDerived | A content editor or agency client holding a low-privilege Craft CMS control panel account - one with template-editing permissions - navigates to the Twig template editor and submits a template that references a standard |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 11, 2026
Remote code execution in Craft CMS allows an authenticated control panel user to escape the Twig sandbox and execute arbitrary server-side PHP, even when sandbox mode is explicitly enabled via enableTwigSandbox(). The root cause is that the sandbox's class allowlisting propagates through the entire class hierarchy of ElementInterface, ultimately exposing the well-known yii\base\Component arbitrary function-call gadget - the identical primitive behind at least four prior Craft CMS CVEs. Affected versions are 5.0.0-RC1 through 5.10.6 and 4.0.0-RC1 through 4.18.2; patched releases 5.10.7 and 4.18.3 are available, and no CISA KEV listing exists at time of analysis.
RemediationAI
Upgrade Craft CMS to version 5.10.7 (5.x branch) or 4.18.3 (4.x branch) via Composer: composer require craftcms/cms:^5.10.7 or composer require craftcms/cms:^4.18.3. The upstream patch commit is https://github.com/craftcms/cms/commit/0b8be1556be4e030578ec779c3e17ffe2e69d7db and the vendor advisory is at https://github.com/craftcms/cms/security/advisories/GHSA-f5wm-88jv-g5hx. If immediate patching is not feasible, audit and restrict control panel user roles to remove template-editing permissions from any account that does not strictly require them - this directly eliminates the attack surface. Restricting control panel access to trusted internal networks or VPN is an additional compensating control but does not eliminate the vulnerability if compromised credentials are used. Critically, do NOT treat enableTwigSandbox() as a mitigation: this vulnerability explicitly bypasses the sandbox, so operators who enabled it believing it provided isolation for multi-tenant template authoring must treat this as a high-priority patch.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Craft CMS implements Twig's sandbox via a SecurityPolicy class fulfilling SecurityPolicyInterface. The policy's checkMethodAllowed and checkPropertyAllowed methods consult both a configured allowlist and the AllowedInSandbox attribute. The critical design flaw (CWE-693: Protection Mechanism Failure) is that when a class is allowlisted, all methods and properties across its entire inheritance hierarchy are implicitly permitted - not just those defined on the named class itself. Craft marks ElementInterface as safe via AllowedInSandbox; the concrete Element class implementing that interface is the base for core model types such as Entry, User, and Asset. Element extends craft\base\Component, which inherits from yii\base\Component in the Yii2 framework. yii\base\Component exposes an arbitrary PHP function-call gadget documented in GHSA-255j-qw47-wjh5, GHSA-2fph-6v5w-89hh, GHSA-7jx7-3846-m7w7, and GHSA-qrgm-p9w5-rrfw. Because the allowlist extends to subclasses and inherited methods, that gadget is reachable from any sandboxed template that holds a reference to an Element-derived object. Affected CPE: cpe:2.3:a:craftcms:cms for both the 4.x and 5.x lines.
Know when 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:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
AV:N for network-accessible control panel; PR:L requires authenticated session with template-edit rights; S:U as impact is contained to the application host with no downstream system compromise.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
Craft CMS versions >= 5.0.0-RC1 before 5.10.7 and >= 4.0.0-RC1 before 4.18.3 contain a remote code execution vulnerability in the Twig sandbox mechanism. Because Craft marks the ElementInterface as safe (via the AllowedInSandbox attribute) and the sandbox allowlisting extends to the entire class hierarchy (craft\base\Component up to yii\base\Component), an authenticated attacker with permission to access the control panel can render a malicious Twig template that abuses the yii\base\Component arbitrary function-call gadget to execute arbitrary code, even when the Twig sandbox is enabled via enableTwigSandbox().
Executive ViewAI
Craft CMS versions 4.x and 5.x (through 4.18.2 and 5.10.6) allow authenticated control panel users to execute arbitrary server code, creating insider risk and escalation risk if control panel accounts are compromised. Organizations operating customer-facing Craft CMS deployments face potential data breach, service disruption, and reputational harm. Immediate patching to versions 4.18.3 or 5.10.7 is essential to eliminate this high-severity exposure.
Apply vendor patch. Interim controls while patching: restrict control panel access to essential personnel, implement monitoring for suspicious PHP execution patterns, and review access logs for evidence of compromise.
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.
Cayin CMS suffers from an authenticated OS semi-blind command injection vulnerability using default credentials. Rated c
Multiple integer underflows in the icmLut_allocate function in International Color Consortium (ICC) Format library (iccl
phpKF CMS 3.00 Beta allows unauthenticated PHP file upload by disguising it as a PNG, then renaming it for execution. Po
Deserialization of Untrusted Data in the Sitecore.Security.AntiCSRF (aka anti CSRF) module in Sitecore CMS 7.0 to 7.2 an
Unauthenticated SQL injection in Craft CMS 4.0.0 before 4.18.9 and 5.0.0 before 5.11.2 allows remote attackers to read a
Deserialization of Untrusted Data in the anti CSRF module in Sitecore through 9.1 allows an authenticated attacker to ex
Unauthenticated file disclosure in LavaLite CMS through 10.1.2 allows remote attackers to download private stored files
Authenticated remote code execution in Craft CMS versions 5.5.0 through 5.9.13 allows admin users to execute arbitrary P
SQL injection vulnerability in hava_post.php in Havalite CMS 1.1.0 and earlier allows remote attackers to execute arbitr
Unrestricted file upload vulnerability in hava_upload.php in Havalite CMS 1.1.0 and earlier allows remote attackers to e
Cross-site request forgery (CSRF) vulnerability in Ilch CMS allows remote attackers to hijack the authentication of admi
Multiple cross-site scripting (XSS) vulnerabilities in Havalite 1.0.4 and earlier allow remote attackers to inject arbit
EUVD-2026-56105
GHSA-h784-hpjp-2rrm
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB