{"id":"GHSA-86vw-x4ww-x467","aliases":["CVE-2026-56382"],"title":"Craft CMS: RCE via missing cleanseConfig in FieldsController::actionRenderCardPreview","titleSource":"OSV","descriptionSource":"OSV","declaredSeverity":"HIGH","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.\n\nThis 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).\n\n## PoC\n\nAs an admin user with a valid session:\n\n```\nPOST /admin/actions/fields/render-card-preview HTTP/1.1\nContent-Type: application/x-www-form-urlencoded\nCookie: CraftSessionId=<session>\n\nfieldLayoutConfig[on+init]=phpinfo&CRAFT_CSRF_TOKEN=<token>\n```\n\nWhen 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.\n\n## Impact\n\nAn 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.","severity":"high","score":8.6,"published":"2026-07-09T13:44:12.000Z","modified":"2026-08-06T21:45:58.113Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"Packagist","name":"craftcms/cms","sources":[{"name":"OSV · GHSA-86vw-x4ww-x467","url":"https://osv.dev/vulnerability/GHSA-86vw-x4ww-x467"}],"ranges":[{"events":[{"introduced":"5.5.0"},{"fixed":"5.9.14"}],"type":"ECOSYSTEM"}],"versions":["5.5.0","5.5.0.1","5.5.1","5.5.1.1","5.5.10","5.5.2","5.5.3","5.5.4","5.5.5","5.5.6","5.5.6.1","5.5.7","5.5.8","5.5.9","5.6.0","5.6.0.1","5.6.0.2","5.6.1","5.6.10","5.6.10.1","5.6.10.2","5.6.11","5.6.12","5.6.13","5.6.14","5.6.15","5.6.16","5.6.17","5.6.2","5.6.3","5.6.4","5.6.5","5.6.5.1","5.6.6","5.6.7","5.6.8","5.6.9","5.6.9.1","5.7.0","5.7.0-beta.1","5.7.0-beta.2","5.7.1","5.7.1.1","5.7.10","5.7.11","5.7.2","5.7.3","5.7.4","5.7.5","5.7.6","5.7.7","5.7.8","5.7.8.1","5.7.8.2","5.7.9","5.8.0","5.8.1","5.8.10","5.8.11","5.8.12","5.8.13","5.8.13.1","5.8.13.2","5.8.14","5.8.15","5.8.16","5.8.17","5.8.18","5.8.19","5.8.2","5.8.20","5.8.21","5.8.22","5.8.23","5.8.3","5.8.4","5.8.5","5.8.6","5.8.7","5.8.8","5.8.9","5.9.0","5.9.0-beta.1","5.9.0-beta.2","5.9.1","5.9.10","5.9.11","5.9.12","5.9.13","5.9.2","5.9.3","5.9.4","5.9.5","5.9.6","5.9.7","5.9.8","5.9.9"],"fixed":["5.9.14"]}],"sourceAffected":[],"references":["https://github.com/craftcms/cms/security/advisories/GHSA-86vw-x4ww-x467","https://nvd.nist.gov/vuln/detail/CVE-2026-56382","https://github.com/craftcms/cms","https://www.vulncheck.com/advisories/craft-cms-remote-code-execution-via-missing-config-sanitization-in-fieldscontroller"],"sources":[{"name":"OSV","id":"GHSA-86vw-x4ww-x467","modified":"2026-08-06T21:45:58.113576927Z","url":"https://osv.dev/vulnerability/GHSA-86vw-x4ww-x467"}],"assessments":[{"source":"OSV","vector":"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","score":8.6}],"products":[],"remediation":[],"kev":{"status":"not-listed","checkedAt":"2026-10-29T00:30:33.731Z"},"coverage":[{"source":"NVD","status":"not-checked"},{"source":"GHSA","status":"not-checked"},{"source":"EUVD","status":"not-checked"},{"source":"EPSS","status":"not-checked"}],"evidence":[]}