CVE-2026-72778: Craft CMS Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-265m-7826-wjqm
CWE-915
Published
Advisory Summary

CVE-2026-72778 is a HIGH remote code execution vulnerability (CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes) affecting Craft CMS libraries in the Packagist ecosystem. The issue involves authenticated rce via `condition.config` json cleanse bypass. Remediation is available by upgrading affected packages to version 5.10.6, 4.18.2.

CVE-2026-72778 at a Glance

CVE Identifier CVE-2026-72778
GHSA Identifier GHSA-265m-7826-wjqm
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes
Affected Product Craft CMS
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-72778

To remediate this vulnerability, upgrade all affected Craft CMS dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

craftcms/cms fixed: 5.10.6
Upgrade craftcms/cms to 5.10.6
craftcms/cms fixed: 4.18.2
Upgrade craftcms/cms to 4.18.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for craftcms/cms

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-72778, inspect your project dependencies for Craft CMS:

inspect dependencies for craftcms/cms

Analyze the terminal output to locate any version of Craft CMS in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.10.6), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes, where the product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. In Craft CMS, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Craft CMS has an authenticated remote code execution issue in the control panel element-search condition handling. Craft cleans the outer request-controlled condition array with `Component::cleanseConfig()`, but `Conditions::createCondition()` later decodes and merges the JSON string in `condition.config` without re-running `cleanseConfig()` on the decoded/merged configuration. Because `condition.config` is a JSON string during the first cleanse, Yii special config keys such as `as` ... and `on` ... can be hidden inside it. After JSON decoding, those keys reach FieldLayout object creation and are interpreted by Yii as behavior/event configuration. The RCE is semi-blind: the trigger endpoint returns a normal JSON response, and the command output is verified via a server-side file-write side effect retrieved in a subsequent request. ## Preconditions - The attacker needs an authenticated Craft control panel session. - A valid CSRF token is required. ## Impact An authenticated control panel user can inject Yii behavior/event configuration after Craft’s intended config cleanse boundary. In the confirmed local lab, this led to command execution as the PHP/web user. Potential attacker impact: - Execute operating system commands as the PHP/web user. - Read Craft secrets, environment variables, and application configuration. - Access database credentials and stored site content. - Modify site content, users, and application state. - Pivot to internal services reachable from the Craft host or container. - Cause denial of service or establish persistence depending on deployment permissions.

CVE-2026-72778 Affected Craft CMS Versions

2 component(s)
Fixed Versions:
5.10.64.18.2
Product / Package Ecosystem Affected Versions Fixed Version
craftcms/cms
Packagist
≥ 5.0.0-RC1
< 5.10.6
5.10.6
craftcms/cms
Packagist
≥ 4.0.0-RC1
< 4.18.2
4.18.2

References

Frequently Asked Questions

What is CVE-2026-72778?
CVE-2026-72778 is a security vulnerability in Craft CMS involving Authenticated RCE via `condition.config` JSON cleanse bypass under CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes.
Which Craft CMS versions are affected?
Affected versions include releases prior to 5.10.6, 4.18.2 across affected packages: craftcms/cms.
What version fixes CVE-2026-72778?
Upgrading to 5.10.6, 4.18.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is craftcms/cms affected?
Yes, craftcms/cms is affected in releases prior to 5.10.6, 4.18.2. Upgrade your dependency to 5.10.6, 4.18.2 or later.
What CWE is associated with CVE-2026-72778?
CVE-2026-72778 is classified under CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes (The product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified.).
How can I check Packagist dependencies for CVE-2026-72778?
Run the dependency tree command: 'inspect dependencies for craftcms/cms'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-265m-7826-wjqm",
  "modified" : "2026-09-01T21:07:23Z",
  "published" : "2026-08-06T20:45:00Z",
  "aliases" : [ "CVE-2026-72778" ],
  "summary" : "Craft CMS: Authenticated RCE via `condition.config` JSON cleanse bypass",
  "details" : "Craft CMS has an authenticated remote code execution issue in the control panel element-search condition handling.\n\nCraft cleans the outer request-controlled condition array with `Component::cleanseConfig()`, but `Conditions::createCondition()` later decodes and merges the JSON string in `condition.config` without re-running `cleanseConfig()` on the decoded/merged configuration.\n\nBecause `condition.config` is a JSON string during the first cleanse, Yii special config keys such as `as` ... and `on` ... can be hidden inside it. After JSON decoding, those keys reach FieldLayout object creation and are interpreted by Yii as behavior/event configuration.\n\nThe RCE is semi-blind: the trigger endpoint returns a normal JSON response, and the command output is verified via a server-side file-write side effect retrieved in a subsequent request.\n\n## Preconditions\n\n- The attacker needs an authenticated Craft control panel session.\n- A valid CSRF token is required.\n\n## Impact\n\nAn authenticated control panel user can inject Yii behavior/event configuration after Craft’s intended config cleanse boundary. In the confirmed local lab, this led to command execution as the PHP/web user.\n\nPotential attacker impact:\n- Execute operating system commands as the PHP/web user.\n- Read Craft secrets, environment variables, and application configuration.\n- Access database credentials and stored site content.\n- Modify site content, users, and application state.\n- Pivot to internal services reachable from the Craft host or container.\n- Cause denial of service or establish persistence depending on deployment permissions.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "craftcms/cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0-RC1"
      }, {
        "fixed" : "5.10.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "craftcms/cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0-RC1"
      }, {
        "fixed" : "4.18.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/security/advisories/GHSA-265m-7826-wjqm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-72778"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/commit/353b5d676c88a854c9f6409ad83b837ca0c0e8da"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/commit/789789dc9e2a4e2f2562f51aaf879fb7757d8340"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/craftcms/cms"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/releases/tag/4.18.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/releases/tag/5.10.6"
  }, {
    "type" : "WEB",
    "url" : "https://www.vulncheck.com/advisories/craft-cms-rc1-before-authenticated-rce-via-condition-config"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-915" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-06T20:45:00Z",
    "nvd_published_at" : null
  }
}