# CVE-2026-72778: Craft CMS authenticated remote code execution in element-search condition

Source: https://junglewise.ai/threats/cve-2026-72778-craft-cms-authenticated-remote-code-execution-in-element-search  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-11. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-72778 · Severity: high · CVSS 8.8 · Published 2026-08-11

Craft CMS is a popular content management system used to build and manage websites and applications. Authenticated users with valid control panel access can execute arbitrary operating system commands by exploiting a flaw in how the application validates configuration parameters, potentially allowing them to read sensitive data, modify site content, access database credentials, or take control of the server.

Technologies: [craftcms/cms (Packagist)](https://junglewise.ai/threats/technologies/craftcms-cms). Vendors: [Packagist](https://junglewise.ai/threats/vendors/packagist).

## Quick answers

**Is CVE-2026-72778 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-72778 being exploited in the wild.

**How severe is CVE-2026-72778?** High severity, with a CVSS score of 8.8, published 11 August 2026.

**Which products and versions are affected?** craftcms/cms (Packagist) ECOSYSTEM:introduced=5.0.0-RC1,fixed=5.10.6.

**Is there a fix for CVE-2026-72778?** Yes. craftcms/cms (Packagist): upgrade to 5.10.6 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-72778 attacked?** It is attacked over the network, in a web application.

**Am I affected by CVE-2026-72778?** Check whether you run craftcms/cms (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- craftcms/cms (Packagist): upgrade to 5.10.6 or later

  ```sh
  composer require craftcms/cms:^5.10.6
  ```


## Technical details

This vulnerability is a configuration cleansing bypass in the element-search condition handling of Craft CMS control panel. The root cause is that Component::cleanseConfig() sanitizes the outer request-controlled condition array to strip dangerous Yii configuration keys (like 'as ...' and 'on ...'), but Conditions::createCondition() later decodes a JSON string from condition.config without re-running the cleanse operation. Since the JSON string bypasses the initial cleansing filter, attackers can embed Yii special config keys inside the JSON that are then interpreted as behavior/event directives during FieldLayout object creation, leading to remote code execution. Attack preconditions: the attacker must possess a valid authenticated control panel session and a valid CSRF token. The RCE is semi-blind—the trigger endpoint returns a normal JSON response, and command output is verified via server-side file-write side effects. Patches are available in Craft CMS 4.18.2 and 5.10.6.

## Affected products

- Craft CMS 4.0.0-RC1 to 4.18.1, 5.0.0-RC1 to 5.10.5

## Identifiers

- CVE-2026-72778
- GHSA-265m-7826-wjqm

## Timeline

- 2026-07-25: disclosed: GitHub Security Advisory (GHSA-265m-7826-wjqm) published
- 2026-08-11: advisory: CVE-2026-72778 and NVD advisory published
- 2026-07-25: patched: Patches released: Craft CMS 4.18.2 and 5.10.6

## References

- [https://github.com/craftcms/cms/security/advisories/GHSA-265m-7826-wjqm](https://github.com/craftcms/cms/security/advisories/GHSA-265m-7826-wjqm)
- [https://www.vulncheck.com/advisories/craft-cms-rc1-before-authenticated-rce-via-condition-config](https://www.vulncheck.com/advisories/craft-cms-rc1-before-authenticated-rce-via-condition-config)

## Related threats

- [Craft CMS: Stored XSS in the control panel via unescaped draft name](https://junglewise.ai/threats/cve-2026-72787-craft-cms-stored-xss-in-the-control-panel-via-unescaped-draft)
- [Craft CMS: Arbitrary user password reset leading to administrator account takeover](https://junglewise.ai/threats/cve-2026-72786-craft-cms-arbitrary-user-password-reset-leading-to-administrator)
- [Craft CMS authorization bypass in category structure modification](https://junglewise.ai/threats/craft-cms-authorization-bypass-in-category-structure-modification-1555f980)
- [Craft CMS authenticated RCE through Twig sandbox escape](https://junglewise.ai/threats/craft-cms-authenticated-rce-through-twig-sandbox-escape-32ee5ec1)
- [Craft CMS path traversal in ensurePathIsContained](https://junglewise.ai/threats/craft-cms-path-traversal-in-ensurepathiscontained-4adc3058)
