
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-28784 is an authenticated Server-Side Template Injection (SSTI) vulnerability in Craft CMS that allows attackers with sufficient privileges to achieve Remote Code Execution (RCE) via a malicious Twig map filter payload. It affects Craft CMS versions 4.0.0-RC1 through 4.16.x and 5.0.0-RC1 through 5.8.x. The vulnerability was published on March 2, 2026, and reviewed by the GitHub Advisory Database on March 3, 2026 (GitHub Advisory). It carries a CVSS v3.1 base score of 7.2 (High) and a CVSS v4.0 base score of 8.6 (High) (GitHub Advisory).
The root cause is improper neutralization of special elements used in a template engine (CWE-1336), specifically Craft CMS's failure to restrict non-Closure arrow functions within the Twig templating engine. An attacker can craft a malicious payload using the Twig map filter (e.g., names|map('ucfirst')) in text fields that accept Twig input — either via Settings in the Craft Control Panel (when allowAdminChanges is enabled) or via the System Messages utility (accessible to non-administrator accounts with that utility permission) (GitHub Advisory). The fix introduced a new enableTwigSandbox config setting that activates the Twig Sandbox extension, which blocks all non-Closure arrow functions and prevents string-based callable injection (Craft CMS PR #18208).
Successful exploitation allows an authenticated attacker to execute arbitrary code on the server hosting Craft CMS, resulting in full compromise of confidentiality, integrity, and availability of the affected system. An attacker could exfiltrate sensitive data (including database credentials, user data, and application secrets), modify or destroy content, and potentially pivot to other systems accessible from the server (GitHub Advisory). The scope is limited to the vulnerable system itself (no subsequent system impact per CVSS v4.0 metrics), but the high impact across all three CIA pillars makes this a serious risk for any Craft CMS deployment with allowAdminChanges enabled or with loosely scoped System Messages utility access (GitHub Advisory).
There is no public proof-of-concept exploit code and no evidence of in-the-wild exploitation at this time (GitHub Advisory). The EPSS score is approximately 0.021% (6th percentile), indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires either administrator-level access to the Craft Control Panel with allowAdminChanges enabled, or a non-administrator account with access to the System Messages utility — both of which are elevated privilege conditions that limit the attacker pool (GitHub Advisory).
allowAdminChanges is enabled), or obtain credentials for a non-administrator account that has been granted access to the System Messages utility.allowAdminChanges enabled) or to the System Messages utility (for accounts with that utility access).map filter with a string-based callable (non-Closure arrow function), for example: {{ ['id']|map('system') }} or similar expressions that invoke PHP functions through Twig's template evaluation./admin/settings/ or /admin/utilities/system-messages containing encoded Twig expressions.bash, sh, curl, wget, python) that are not part of normal Craft CMS operation.Craft CMS has released patched versions: 5.8.22 (5.x branch) and 4.16.18 (4.x branch); upgrading to these or later versions is the primary recommended remediation (GitHub Advisory). As a configuration-based mitigation, set allowAdminChanges to false in all production environments, which is already Craft CMS's documented security recommendation (Craft CMS Security Guide). Additionally, restrict access to the System Messages utility to only fully trusted users, and enable the new enableTwigSandbox config setting introduced in PR #18208 to enforce Twig sandbox restrictions (Craft CMS PR #18208).
The vulnerability was discovered by security researchers RajChowdhury240 (finder) and rlarabee (reporter), and was responsibly disclosed to the Craft CMS team (GitHub Advisory). The Craft CMS maintainer (brandonkelly) addressed the issue by introducing a Twig sandbox configuration option that disallows non-Closure arrow functions, with the fix merged on January 2, 2026 (Craft CMS PR #18208). Community reaction has been limited given the elevated privilege requirement, with the advisory rated "Moderate" severity by GitHub despite the High CVSS scores, reflecting the constrained exploitation conditions.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."