Description
Craft CMS from 5.0.0 before 5.11.0 contains a remote code execution vulnerability that allows authenticated Control Panel users to escape the Twig sandbox by passing uncleansed criteria to getNext, getPrev, or getOwners. Attackers can inject Yii "as" or "on" config keys to attach malicious event handlers that execute when the element query runs, achieving code execution as the web user.
Published: 2026-10-19
Score: 8.7 High
EPSS: n/a
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

Impact

Craft CMS versions 5.0.0 through 5.10.x contain a flaw that lets authenticated Control Panel users escape the Twig sandbox by passing unfiltered criteria to element query methods such as getNext, getPrev, or getOwners. By injecting specialized Yii configuration keys – namely "as" or "on" – an attacker can attach custom event handlers that execute when the query runs, giving the ability to run arbitrary PHP code as the web application user. This is a classic code‑injection vulnerability classified under CWE‑94.

Affected Systems

The issue affects installations running Craft CMS beginning with version 5.0.0 up to but excluding 5.11.0. The vulnerability is tied to the craftcms:cms package and is relevant only when the application’s admin interface is accessible to authenticated users. Versions 5.11.0 and later include the vendor supplied patch that removes the sandbox escape path.

Risk and Exploitability

The flaw carries a CVSS score of 8.7, indicating high severity. Although EPSS data is not available, the vulnerability is currently not listed in CISA KEV. The attack vector is remote but relies on authenticated access to the Control Panel; successful exploitation would allow execution of code with the web process’s privileges, potentially enabling full system compromise if that user has elevated rights. Due to the high impact and the requirement for authentication, applying the vendor patch promptly is essential.

Generated by OpenCVE AI on October 19, 2026 at 20:25 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Craft CMS to 5.11.0 or later to apply the official fix
  • Restrict Control Panel access to trusted users and enable multi‑factor authentication so that authenticated sessions are protected
  • Monitor application logs for unusual Twig queries or failed login attempts to detect potential exploitation attempts

Generated by OpenCVE AI on October 19, 2026 at 20:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 19 Oct 2026 19:30:00 +0000

Type Values Removed Values Added
Description Craft CMS from 5.0.0 before 5.11.0 contains a remote code execution vulnerability that allows authenticated Control Panel users to escape the Twig sandbox by passing uncleansed criteria to getNext, getPrev, or getOwners. Attackers can inject Yii "as" or "on" config keys to attach malicious event handlers that execute when the element query runs, achieving code execution as the web user.
Title Craft CMS 5.0.0 before 5.11.0 RCE via Twig Sandbox Behavior Injection
First Time appeared Craftcms
Craftcms craft Cms
Weaknesses CWE-94
CPEs cpe:2.3:a:craftcms:craft_cms:*:*:*:*:*:*:*:*
Vendors & Products Craftcms
Craftcms craft Cms
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.7, 'vector': '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'}


Subscriptions

Craftcms Craft Cms
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-19T21:23:32.874Z

Reserved: 2026-10-19T18:10:49.940Z

Link: CVE-2026-112773

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-10-19T20:17:54.480

Modified: 2026-10-19T20:59:50.503

Link: CVE-2026-112773

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-19T20:30:03Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')