Skip to main content

Craft CMS CVE-2025-68455

HIGH
Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') (CWE-470)
2026-01-05 security-advisories@github.com GHSA-255j-qw47-wjh5
8.6
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain Control Panel admin access
  2. Delivery
    Craft malicious AttributeTypecastBehavior config
  3. Exploit
    POST behavior to Fields controller via 'as' syntax
  4. Execution
    Trigger event on tainted Component
  5. Persist
    Reflection invokes attacker callable
  6. Impact
    Execute 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 1.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – 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)
v1 Mar 12, 2026 - 21:54 CVSS 7.2

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

composer craftcms/cms fix: 4.16.17, 5.8.21

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

Vendor (github) PRIMARY 8.6 HIGH
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
vuln.today AI 7.2 HIGH

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.

3.1 AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
High
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

5
Analysis Updated
Sep 30, 2026 - 23:05 vuln.today
v2 - CVSS changed
CVSS changed
Sep 30, 2026 - 22:23 NVD
7.2 (HIGH) 8.6 (HIGH)
PoC Detected
Jan 12, 2026 - 18:21 vuln.today
Public exploit code
Patch released
Jan 12, 2026 - 18:21 nvd
Patch available
CVE Published
Jan 05, 2026 - 22:15 nvd
HIGH 7.2

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
1.1%
Top 22% exploitable
Prevalence
Medium
popular PHP content-management system, common but not ubiquitous in web deployments
Exploit
POC
Public exploit code exists
Data Quality
4 sources
Confidence: Medium

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 1.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

64
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +43
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

cpe:2.3:a:craftcms:craft_cms:*:*:*:*:*:*:*:*
cpe:2.3:a:craftcms:craft_cms:*:*:*:*:*:*:*:*
cpe:2.3:a:craftcms:craft_cms:4.0.0:-:*:*:*:*:*:*
cpe:2.3:a:craftcms:craft_cms:4.0.0:rc1:*:*:*:*:*:*
cpe:2.3:a:craftcms:craft_cms:4.0.0:rc2:*:*:*:*:*:*
cpe:2.3:a:craftcms:craft_cms:4.0.0:rc3:*:*:*:*:*:*
cpe:2.3:a:craftcms:craft_cms:5.0.0:-:*:*:*:*:*:*
cpe:2.3:a:craftcms:craft_cms:5.0.0:rc1:*:*:*:*:*:*
CVE-2025-32432 CRITICAL POC
10.0 Apr 25

Craft CMS versions 3.x through 5.x contain a critical remote code execution vulnerability (CVSS 10.0) that allows unauth

CVE-2025-35939 MEDIUM
6.9 May 07

Craft CMS stores arbitrary content provided by unauthenticated users in session files. Rated medium severity (CVSS 6.9),

CVE-2023-41892 CRITICAL POC
9.8 Sep 13

Craft CMS is a platform for creating digital experiences. Rated critical severity (CVSS 9.8), this vulnerability is remo

CVE-2024-56145 CRITICAL POC
9.3 Dec 18

Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond. Rated critical sev

CVE-2024-37843 CRITICAL POC
9.8 Jun 25

Craft CMS up to v3.7.31 was discovered to contain a SQL injection vulnerability via the GraphQL API endpoint. Rated crit

CVE-2020-9757 CRITICAL POC
9.8 Mar 04

The SEOmatic component before 3.3.0 for Craft CMS allows Server-Side Template Injection that leads to RCE via malformed

CVE-2026-28697 CRITICAL POC
9.1 Mar 04

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

CVE-2026-25495 HIGH POC
8.8 Feb 09

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

CVE-2023-30130 HIGH POC
8.8 May 12

An issue found in CraftCMS v.3.8.1 allows a remote attacker to execute arbitrary code via a crafted script to the Sectio

CVE-2022-29933 HIGH POC
8.8 May 09

Craft CMS through 3.7.36 allows a remote unauthenticated attacker, who knows at least one valid username, to reset the a

CVE-2018-3814 HIGH POC
8.8 Jan 01

Craft CMS 2.6.3000 allows remote attackers to execute arbitrary PHP code by using the "Assets->Upload files" screen and

CVE-2026-28696 HIGH POC
7.5 Mar 04

Craft is a content management system (CMS). [CVSS 7.5 HIGH]

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy