Craft CMS
CVE-2025-68455
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain Control Panel admin access
-
DeliveryCraft malicious AttributeTypecastBehavior config
-
ExploitPOST behavior to Fields controller via 'as' syntax
-
ExecutionTrigger event on tainted Component
-
PersistReflection invokes attacker callable
-
ImpactExecute arbitrary PHP on server
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V15 - Secure Coding and Architecture Reflection safety, class allowlisting
|
| Exploitation Conditions | Requires an authenticated session with administrator privileges on the Craft Control Panel (PR:H) - the vendor GHSA and CVE description both state this is mandatory. The attack targets Fields controller endpoints that accept a fieldLayoutConfig/layoutConfig/config body parameter, into which the attacker injects a Yii Behavior (yii\behaviors\AttributeTypecastBehavior) using the 'as <behavior>' attachment syntax, with a wildcard event binding so any event fired on the Component triggers the attacker-defined callable via reflection. Limiting factors: exploitation is confined to Craft CMS versions 5.0.0-RC1 through 5.8.20 and 4.0.0-RC1 through 4.16.16; it cannot be performed by unauthenticated or non-admin users; and the patched versions (5.8.21 / 4.16.17) add Component::cleanseConfig() to strip behavior-attachment keys. Realistic risk is elevated only where CP admin is delegated to lower-trust users or where admin credentials/sessions can be compromised. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H) scores 8.6 (High) with full confidentiality, integrity, and availability impact reflecting code execution, but the single most important gating factor is PR:H - the vendor GHSA and CVE description both explicitly state the attacker must already hold administrator access to the Craft Control Panel. This substantially lowers real-world priority: the attacker is already a trusted, fully privileged operator, so exploitation is effectively privilege-to-code-execution for someone who can already alter almost anything in the CMS. EPSS is 1.12% (78th percentile) - moderate relative ranking but low absolute probability. POC/exploit code is publicly available (referenced via the GHSA advisory and the technique is documented, building on CVE-2024-4990/CVE-2024-58136 and a Yii-framework advisory), which raises the likelihood of opportunistic use, but there is no CISA KEV listing and no evidence of active exploitation. No SSVC decision data was provided. Signals are consistent - high technical impact but strongly constrained by the admin prerequisite. Net: this is a patch-in-normal-cycle issue for most operators, escalating in priority only where Control Panel admin accounts are broadly delegated, shared, or reachable by lower-trust users. |
| Exploit ScenarioDerived | An attacker who has obtained (or abused) Craft Control Panel administrator access submits a crafted JSON POST to a Fields controller endpoint, attaching a legitimate but weaponized Yii Behavior (yii\behaviors\AttributeTypecastBehavior) to a Component via the 'as <behavior>' syntax. When an event fires on the tainted Component, the behavior's attacker-defined callable is invoked via reflection, executing arbitrary PHP on the server. Public exploit/technique details exist in the GHSA advisory and the related Yii advisory, so reproduction is straightforward for a privileged attacker. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Sep 30, 2026
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 attacker who already holds administrator access to the Craft Control Panel execute arbitrary PHP code on the server. The flaw is triggered by submitting a crafted Yii Behavior (yii\behaviors\AttributeTypecastBehavior) through field-layout body parameters (layoutConfig/config), abusing the 'as <behavior>' attachment syntax and a wildcard event binding so that any event fired on the tainted Component invokes an attacker-defined callable via reflection. Publicly available exploit code exists, and EPSS rates the issue at 1.12% (78th percentile), but there is no confirmed active exploitation (not in CISA KEV); the practical risk is heavily gated by the requirement for administrator privileges, so exposure is greatest where CP admin rights are delegated to lower-trust users or where admin sessions can be hijacked.
Earlier versions of this analysis (1)
Craft is a platform for creating digital experiences. Versions 5.0.0-RC1 through 5.8.20 and 4.0.0-RC1 through 4.16.16 are vulnerable to potential authenticated Remote Code Execution via malicious attached Behavior. [CVSS 7.2 HIGH]
RemediationAI
Upgrade Craft CMS to 5.8.21 or 4.16.17 - the vendor-released patch versions - which introduce Component::cleanseConfig() to strip behavior-attachment ('as <behavior>') keys before field-layout configuration is processed. The relevant fixes are in commits 27f55886098b56c00ddc53b69239c9c9192252c7, 6e608a1a5bfb36943f94f584b7548ca542a86fef and ec43c497edde0b2bf2e39a119cded2e55f9fe593, and full details are in the advisory https://github.com/craftcms/cms/security/advisories/GHSA-255j-qw47-wjh5. Because the flaw requires Craft Control Panel administrator privileges, compensating controls should focus on reducing admin attack surface until patching: restrict who can authenticate to the Control Panel and revoke or tightly scope delegated admin accounts (trade-off: reduced operational flexibility), enforce MFA and short session lifetimes on admin accounts so stolen sessions cannot be reused (trade-off: added login friction), and log/monitor POST requests to the Fields controller endpoints that carry layoutConfig or config parameters so suspicious behavior-injection payloads are detected. Isolating the CP behind VPN or IP allowlisting and disabling unused field-management endpoints further limits exposure without breaking the site for anonymous visitors; none of these controls fully substitute for upgrading to 5.8.21 or 4.16.17.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in composer
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability sits in Yii framework's behavior-attachment mechanism as consumed by Craft CMS. Craft's FieldsController accepts JSON POST body parameters (layoutConfig, config) and passes them into Yii Component configuration; because Yii supports 'as <behavior>' keys, an attacker can attach a Behavior to a Component. Earlier issues - CVE-2024-4990 and CVE-2024-58136 - were mitigated by restricting attachments to legitimate Behavior classes, but this flaw bypasses those mitigations by using an entirely legitimate class, yii\behaviors\AttributeTypecastBehavior, which allows an attacker-defined callable to be registered and later triggered by an event fired on the Component, escalating to arbitrary code execution through reflection. This maps to CWE-470 (Use of Externally-Controlled Input to Select Classes or Code), i.e., the application lets untrusted input choose which class/code path is instantiated. The upstream Yii maintainers declined to patch the framework, placing responsibility on application developers, so Craft addressed it at the application layer by wrapping the untrusted configuration arrays in Component::cleanseConfig(), which strips behavior-attachment keys before the config is consumed. Affected CPE entries center on cpe:2.3:a:craftcms:craft_cms with 4.x and 5.x version ranges, including the 4.0.0 and 5.0.0 release candidates.
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:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Network-reachable Control Panel with no user interaction, but exploitation demands administrator privileges (PR:H); resulting arbitrary PHP execution yields full C/I/A impact with no scope change.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
5DescriptionCVE.org
Craft is a platform for creating digital experiences. Versions 5.0.0-RC1 through 5.8.20 and 4.0.0-RC1 through 4.16.16 are vulnerable to potential authenticated Remote Code Execution via malicious attached Behavior. Note that attackers must have administrator access to the Craft Control Panel for this to work. Users should update to the patched versions (5.8.21 and 4.16.17) to mitigate the issue.
Executive ViewAI
Craft CMS releases 5.0.0-RC1 through 5.8.20 and 4.0.0-RC1 through 4.16.16 contain a high-severity remote code execution issue that lets someone with administrator access to the Craft Control Panel run arbitrary PHP code on the host, and publicly available exploit code exists (not in CISA KEV). Because the flaw requires existing Control Panel administrator rights, the greatest organizational exposure is where admin access is widely delegated or where admin sessions can be hijacked, with potential for server compromise, data exposure, and service disruption. Leadership should prioritize confirming exposure and applying the vendor patch, especially in environments with lower-trust administrators or weak session controls.
Apply vendor patch.
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.
Affected Products (CPE)CVE.org
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
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
Craft is a content management system (CMS). [CVSS 7.5 HIGH]
GHSA-255j-qw47-wjh5
NVD
CVE.org
EPSS
Exploit-DB