# CVE-2026-112773: Craft CMS Twig sandbox escape and remote code execution

Source: https://junglewise.ai/threats/cve-2026-112773-craft-cms-from-5-0-0-before-5-11-0-contains-a-remote-code  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-19. Updated: 2026-10-19  
License: CC BY 4.0 with a link back

CVE-2026-112773 · Severity: high · CVSS 8.8 · Published 2026-10-19

Craft CMS, a content management system for building web applications, allows authenticated users with Control Panel access to run arbitrary code through a Twig sandbox escape vulnerability. An attacker with a Control Panel account can inject malicious Yii configuration to execute commands as the web server user, potentially compromising the entire website and its data.

Technologies: [Craft CMS](https://junglewise.ai/threats/technologies/craft-cms-1). Vendors: [Craft](https://junglewise.ai/threats/vendors/craft).

## Quick answers

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

**How severe is CVE-2026-112773?** High severity, with a CVSS score of 8.8, published 19 October 2026.

**Which products and versions are affected?** Craft CMS 5.0.0 to 5.10.x.

**Is there a fix for CVE-2026-112773?** Yes: fixed in 5.11.0. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-112773 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-112773?** Check whether you run Craft CMS 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

- Fixed in 5.11.0

## Technical details

The vulnerability exists in ElementInterface::getNext(), getPrev(), and NestedElementInterface::getOwners() methods, which accept uncleansed criteria arrays and pass them to Craft::configure(). By injecting Yii "as" or "on" config keys, an attacker can attach malicious event handlers that fire during query execution (EVENT_BEFORE_PREPARE). This bypasses the Twig sandbox when methods are called from sandboxed contexts such as system message rendering or element-select condition rules, requiring authenticated Control Panel access and enableTwigSandbox=true (default false).

## Affected products

- Craft CMS 5.0.0 to 5.10.x

## Timeline

- 2026-10-05: disclosed
- 2026-10-19: advisory

## References

- [https://github.com/craftcms/cms/security/advisories/GHSA-wr79-9v6x-5rfq](https://github.com/craftcms/cms/security/advisories/GHSA-wr79-9v6x-5rfq)
- [https://www.vulncheck.com/advisories/craft-cms-5.0.0-before-5.11.0-rce-via-twig-sandbox-behavior-injection](https://www.vulncheck.com/advisories/craft-cms-5.0.0-before-5.11.0-rce-via-twig-sandbox-behavior-injection)

## Related threats

- [Craft CMS SQL injection in craft.search](https://junglewise.ai/threats/cve-2026-115934-an-unauthenticated-sql-injection-can-occur-on-the-front-end-of)
- [Craft CMS authorization bypass in volume browser](https://junglewise.ai/threats/cve-2026-124431-craft-cms-from-5-10-0-before-5-11-2-contains-an-authorization)
- [Craft CMS privilege escalation in public registration](https://junglewise.ai/threats/cve-2026-124429-craft-cms-from-5-0-0-before-5-11-2-contains-a-privilege)
- [Craft CMS path traversal in app/icon-svg endpoint](https://junglewise.ai/threats/cve-2026-124428-craft-cms-from-5-7-0-before-5-11-2-contains-an-arbitrary-file)
- [Craft CMS authorization bypass in GraphQL schema scope](https://junglewise.ai/threats/cve-2026-124427-craft-cms-from-5-0-0-before-5-11-2-contains-an-authorization)
