---
id: "CVE-2026-112774"
kind: "vulnerability"
aliases: ["CVE-2026-112774"]
title: "Craft CMS: admin field layout input lets an admin run OS commands"
severity: "high"
cvss: 8.7
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["craft-cms", "php", "runtime", "self-hosted"]
not_affected_if: ["allowadminchanges-disabled", "version-5.11.0-or-later", "version-below-5.8.0"]
published_at: "2026-10-19T20:17:54+00:00"
first_seen_at: "2026-10-23T21:57:19+00:00"
updated_at: "2026-10-23T22:37:30+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-112774", "first_seen_at": "2026-10-23T21:57:19+00:00"}]
---

# Craft CMS: admin field layout input lets an admin run OS commands

Craft CMS 5.8.0 before 5.11.0 lets an authenticated administrator inject Yii behaviors through a JSON field layout passed to ContentBlock::setFieldLayout(). The injected 'as X' or 'on X' keys bypass cleanseConfig(), so the attacker runs OS commands as the web user and can read secrets.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

Check the installed Craft version in composer.lock for craftcms/cms; a version from 5.8.0 up to but not including 5.11.0 is affected.
Check config/general.php for allowAdminChanges; it must be enabled for this path to work.

## Fix

Upgrade craftcms/cms to 5.11.0 or later.
Until then, set allowAdminChanges to false in production and limit admin accounts to trusted people.

## Timeline

- 2026-10-23T21:57:19+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-112774

## From the sources

Craft CMS from 5.8.0 before 5.11.0 contains a remote code execution vulnerability that allows authenticated administrators to inject Yii behaviors by supplying a JSON-string field layout to ContentBlock::setFieldLayout(). Attackers with allowAdminChanges enabled can include 'as X' or 'on X' keys that bypass cleanseConfig() to execute OS commands as the web user and disclose secrets.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
