Cyber Resilience

CVE-2026-28783

RCE in Craftcms Craft Cms 4.0.0 – 4.17.0

Published
04 March 2026
Modified
05 March 2026
Patch / advisory
CVSS Score v4 9.4
Click a component to see what it means
Raw vectorCVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS Score 0.0046 38th percentile
Risk Priority 32 floored blend · peak EPSS

Summary

CVE-2026-28783 is a critical-severity Code Injection (CWE-94) vulnerability in Craftcms Craft Cms. Its CVSS base score is 9.4 (Critical).

Operationally, exploitation aligns with the MITRE ATT&CK technique Template Injection (T1221); ranked at the 38th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

Craft CMS, a content management system, is affected by CVE-2026-28783 in versions prior to 5.9.0-beta.1 and 4.17.0-beta.1. The vulnerability stems from an incomplete blocklist designed to prevent dangerous PHP functions from being invoked via Twig non-Closure arrow functions. Several PHP functions are omitted from this blocklist, enabling the execution of malicious payloads when certain conditions are met.

Exploitation requires either the allowAdminChanges setting enabled in production environments, a compromised administrator account, or an account with access to the System Messages utility. Attackers with these privileges can leverage the flaw to execute various payloads, including remote code execution (RCE), arbitrary file reads, server-side request forgery (SSRF), and server-side template injection (SSTI). The issue carries a CVSS v3.1 base score of 9.1 (AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H) and is associated with CWEs-94 (Code Injection), CWE-184 (Incomplete List of Disallowed Inputs), and CWE-1336 (Improper Neutralization of Special Elements).

The vulnerability is addressed in Craft CMS versions 5.9.0-beta.1 and 4.17.0-beta.1, which update the blocklist to include the missing PHP functions. Official mitigation details are available in the Craft CMS security advisory at https://github.com/craftcms/cms/security/advisories/GHSA-5fvc-7894-ghp4 and the corresponding pull request at https://github.com/craftcms/cms/pull/18208, recommending immediate upgrades for affected installations.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

Craft is a content management system (CMS). Prior to 5.9.0-beta.1 and 4.17.0-beta.1, Craft CMS implements a blocklist to prevent potentially dangerous PHP functions from being called via Twig non-Closure arrow functions. In order to be able to successfully execute this…

more

attack, you need to either have allowAdminChanges enabled on production, or a compromised admin account, or an account with access to the System Messages utility. Several PHP functions are not included in the blocklist, which could allow malicious actors with the required permissions to execute various types of payloads, including RCEs, arbitrary file reads, SSRFs, and SSTIs. This vulnerability is fixed in 5.9.0-beta.1 and 4.17.0-beta.1.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1221 Template Injection Stealth
Adversaries may create or modify references in user document templates to conceal malicious code or force authentication attempts.
T1059 Command and Scripting Interpreter Execution
Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries.
T1059.001 PowerShell Execution
Adversaries may abuse PowerShell commands and scripts for execution.
T1059.002 AppleScript Execution
Adversaries may abuse AppleScript for execution.
T1059.004 Unix Shell Execution
Adversaries may abuse Unix shell commands and scripts for execution.
T1059.005 Visual Basic Execution
Adversaries may abuse Visual Basic (VB) for execution.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2023-30130Same product: Craftcms Craft Cms
CVE-2023-41892Same product: Craftcms Craft Cms
CVE-2025-23209Same product: Craftcms Craft Cms
CVE-2026-31857Same product: Craftcms Craft Cms
CVE-2025-32432Same product: Craftcms Craft Cms
CVE-2025-54417Same product: Craftcms Craft Cms
CVE-2023-30179Same product: Craftcms Craft Cms
CVE-2024-56145Same product: Craftcms Craft Cms
CVE-2025-57811Same product: Craftcms Craft Cms
CVE-2025-46731Same product: Craftcms Craft Cms

Affected Assets

craftcms
craft cms
4.0.0, 5.0.0 · 4.0.0 — 4.17.0 · 5.0.0 — 5.9.0

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)
  • 2 hardening rules · 1 OS baseline
Validate
Prove the fix (OWASP ASVS)
  • V3.5.2
  • V1.3.2
  • V1.3.7
  • V1.3.10

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and evaluation finds code paths that accept and execute externally influenced strings.

Input validation directly stops untrusted data from being used to construct executable code without neutralization.

Least privilege limits the damage an injected code fragment can perform once executed.

Requiring documented secure development standards and tools enforces use of safe code-generation APIs and escaping.

Security engineering principles require use of safe templating APIs and proper escaping of external input.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

PR.PS-06's SDLC practices directly target injection flaws via secure coding and testing (mostly), yet as a single broad outcome it leaves many code-generation specifics unaddressed (partial).

PR.DS-10 none match
prevents

PR.DS-10 protects runtime data confidentiality/integrity but has no bearing on neutralizing externally influenced input during code generation, so neither direction shows any preventive effect.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing can discover missing input checks, but does not prevent the weakness during development.

prevents

Secure development life cycle mandates input validation and sanitization that directly prevents template-injection weaknesses.

prevents

Application security requirements can mandate complete input validation rules, but the control itself does not prescribe how to build those rules.

prevents

Secure architecture principles include robust input validation design, yet the control is broader than this single weakness.

prevents

Banning unapproved code samples and unauthenticated web services, combined with secure-coding standards and SAST, prevents the dynamic generation or inclusion of attacker-supplied code.

none

Controls that restrict unauthorized or malicious code from being introduced via external networks or removable media limit opportunities for an attacker to inject and execute arbitrary code.

References