Description
Craft CMS 4.x before 4.18.8 and 5.x before 5.11.0 contains a blocklist bypass in the Twig create() function because its class-name checks are case-sensitive while PHP class resolution is not. Attackers with template-execution rights, such as Control Panel administrators, can instantiate SplFileObject via a lowercase class name to read .env secrets or write a PHP file into the webroot for remote code execution.
Published: 2026-10-19
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

Impact

Craft CMS versions before 4.18.8 for the 4.x line and before 5.11.0 for the 5.x line contain a blocklist bypass in the Twig create() function. The function performs case‑sensitive class‑name checks while PHP class resolution is case‑insensitive. This mismatch allows an attacker to instantiate a PHP class using a lowercase name that is blocked in the list, enabling operations such as creating a SplFileObject. With template‑execution rights—typically held by Control Panel administrators—the attacker can leverage this flaw to read sensitive files such as .env or to write a PHP file into the webroot, leading to remote code execution. The flaw maps to CWE‑184, a copy‑paste error that causes incorrect program behavior.

Affected Systems

The vulnerability impacts Craft CMS installations running version 4.x prior to 4.18.8 or version 5.x prior to 5.11.0. Sites that host the affected CMS build and have users with template‑execution privileges are at risk. The bug resides in the core Twig integration component of the Craft CMS application.

Risk and Exploitability

The CVSS score for this issue is 8.7, indicating a high severity level. EPSS data is not available, so the likelihood of exploitation cannot be quantified from the supplied data. The vulnerability is not listed in the CISA KEV catalog, implying no known public exploits at the time of analysis. However, exploitation requires template‑execution rights, a privilege usually granted to administrative users, so the impact scope is limited to sites where such users exist. Once the privilege is obtained, the attack path is straightforward, underscoring the need for immediate patching and strict access controls.

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

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Craft CMS to version 4.18.8 or later for the 4.x line or to version 5.11.0 or later for the 5.x line, as this releases fixes the blocklist check in Twig create()
  • Restrict template‑execution permissions to only essential users, removing Control Panel administrator rights from anyone who does not require them
  • Harden file system and web server configuration so that any PHP file written to the webroot is not executable, and verify that web server settings disallow execution of arbitrary PHP scripts in the public directories

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 19 Oct 2026 21:15:00 +0000

Type Values Removed Values Added
First Time appeared Craftcms cms
Vendors & Products Craftcms cms

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

Type Values Removed Values Added
Description Craft CMS 4.x before 4.18.8 and 5.x before 5.11.0 contains a blocklist bypass in the Twig create() function because its class-name checks are case-sensitive while PHP class resolution is not. Attackers with template-execution rights, such as Control Panel administrators, can instantiate SplFileObject via a lowercase class name to read .env secrets or write a PHP file into the webroot for remote code execution.
Title Craft CMS before 4.18.8 and 5.11.0 Twig create() Blocklist Bypass Leading to RCE
First Time appeared Craftcms
Craftcms craft Cms
Weaknesses CWE-184
CPEs cpe:2.3:a:craftcms:craft_cms:*:*:*:*:*:*:*:*
Vendors & Products Craftcms
Craftcms craft Cms
References
Metrics cvssV3_1

{'score': 7.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/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:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-19T19:10:54.567Z

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

Link: CVE-2026-112777

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

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

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

Link: CVE-2026-112777

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-19T21:00:04Z

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs