Skip to main content

Craft CMS: RCE via missing cleanseConfig in FieldsController::actionRenderCardPreview (CVE-2026-56382)

0
High
Published: 07/09/2026 (07/09/2026, 13:44:12 UTC)
Source: GCVE Database
Product: craftcms/cms

Description

The `actionRenderCardPreview()` method in `FieldsController` passes the `fieldLayoutConfig` POST parameter directly to `Fields::createLayout()` without calling `Component::cleanseConfig()`. This allows Yii2 event handler injection via `on eventName` keys in the config array, leading to arbitrary code execution. This is the same vulnerability pattern that was fixed in GHSA-4484-8v2f-5748 (same file, `_fldComponent` method correctly uses `cleanseConfig`), GHSA-qx2q-q59v-wf3j (EntryTypesController), and GHSA-2fph-6v5w-89hh (ElementIndexesController). ## PoC As an admin user with a valid session: ``` POST /admin/actions/fields/render-card-preview HTTP/1.1 Content-Type: application/x-www-form-urlencoded Cookie: CraftSessionId=<session> fieldLayoutConfig[on+init]=phpinfo&CRAFT_CSRF_TOKEN=<token> ``` When the FieldLayout object is constructed, Yii2 processes the `on init` key as an event handler registration. During `Component::init()`, the `init` event is triggered, calling `phpinfo()`. The phpinfo output (which includes environment variables, potentially containing database credentials and `CRAFT_SECURITY_KEY`) will appear in the response. ## Impact An authenticated admin can achieve RCE through Yii2 event handler injection. While this requires admin access (same as GHSA-4484-8v2f-5748, which was rated moderate), it allows arbitrary PHP function execution and information disclosure via phpinfo.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
High
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

Packagistghsa
craftcms/cms
Affected versions
>=5.5.0 <5.9.14

Run 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

AILast updated: 07/10/2026, 10:24:14 UTC

Technical Analysis

The actionRenderCardPreview() method in Craft CMS's FieldsController improperly handles the fieldLayoutConfig POST parameter by passing it directly to Fields::createLayout() without invoking Component::cleanseConfig(). This omission permits Yii2 event handler injection through specially crafted 'on eventName' keys in the configuration array, resulting in arbitrary code execution. The vulnerability requires authenticated admin access and mirrors a previously fixed pattern in other parts of the application. A proof-of-concept demonstrates that an attacker can trigger PHP functions like phpinfo() during object initialization, exposing sensitive environment details including database credentials and security keys.

Potential Impact

An attacker with authenticated admin privileges can achieve remote code execution on the affected Craft CMS instance by injecting Yii2 event handlers via the fieldLayoutConfig parameter. This leads to arbitrary PHP function execution and potential disclosure of sensitive environment information, including database credentials and security keys. The vulnerability poses a high risk due to the severity of impact, although it requires high privileges to exploit.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict admin access to trusted users only and monitor for suspicious activity. Avoid exposing the affected endpoint to untrusted networks. Follow vendor updates closely for a security patch addressing this issue.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-86vw-x4ww-x467
Osv Schema Version
1.4.0
Ecosystems
["Packagist"]
Database Specific Severity
HIGH
Cvss Version
4.0

Threat ID: 6a50bac868715ace43589282

Added to database: 07/10/2026, 09:26:32 UTC

Last enriched: 07/10/2026, 10:24:14 UTC

Last updated: 09/13/2026, 20:50:05 UTC

Views: 178

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses