Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-28784: CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine in craftcms cms

0
High
VulnerabilityCVE-2026-28784cvecve-2026-28784cwe-1336
Published: Wed Mar 04 2026 (03/04/2026, 16:53:15 UTC)
Source: CVE Database V5
Vendor/Project: craftcms
Product: cms

Description

Craft is a content management system (CMS). Prior to 5.8.22 and 4.16.18, it is possible to craft a malicious payload using the Twig map filter in text fields that accept Twig input under Settings in the Craft control panel or using the System Messages utility, which could lead to a RCE. For this to work, you must have administrator access to the Craft Control Panel, and allowAdminChanges must be enabled for this to work, which is against our recommendations for any non-dev environment. Alternatively, you can have a non-administrator account with allowAdminChanges disabled, but you have access to the System Messages utility. Users should update to the patched versions (5.8.22 and 4.16.18) to mitigate the issue.

AI-Powered Analysis

AILast updated: 03/04/2026, 17:32:39 UTC

Technical Analysis

CVE-2026-28784 is a critical vulnerability in the Craft CMS platform caused by improper neutralization of special elements used in the Twig template engine (CWE-1336). Specifically, the flaw allows an attacker with administrator privileges and the allowAdminChanges setting enabled, or a non-administrator with access to the System Messages utility, to inject malicious payloads via the Twig map filter in text fields that accept Twig input. This injection leads to remote code execution (RCE), enabling attackers to execute arbitrary code on the server hosting the CMS. The vulnerability affects Craft CMS versions from 4.0.0-RC1 up to 4.17.0-beta.1 and 5.0.0-RC1 up to 5.9.0-beta.1. The root cause is insufficient sanitization and neutralization of special template elements, allowing crafted input to be interpreted and executed by the Twig engine. Exploitation does not require user interaction but does require elevated privileges or specific utility access, limiting the attack surface to some extent. The vulnerability was publicly disclosed in March 2026 with a CVSS 4.0 score of 8.6, indicating high severity due to network attack vector, low attack complexity, no user interaction, and high impact on confidentiality, integrity, and availability. No known exploits have been observed in the wild, but the risk remains significant for affected installations. The vendor recommends updating to patched versions 5.8.22 and 4.16.18 to remediate the issue.

Potential Impact

The impact of CVE-2026-28784 is substantial for organizations using vulnerable versions of Craft CMS. Successful exploitation results in remote code execution, which can lead to full system compromise, data theft, defacement, or use of the server as a pivot point for further attacks. Confidentiality is at risk as attackers can access sensitive data stored or processed by the CMS. Integrity is compromised as attackers can modify content, configurations, or inject malicious code. Availability may be disrupted if attackers deploy destructive payloads or ransomware. Since the vulnerability requires administrator access or access to the System Messages utility, the threat is primarily internal or from compromised accounts, but the ease of exploitation under these conditions elevates the risk. Organizations running public-facing websites or critical infrastructure on Craft CMS are particularly vulnerable, potentially affecting brand reputation, customer trust, and regulatory compliance. The lack of known exploits in the wild reduces immediate risk but does not eliminate the threat, especially as proof-of-concept code may emerge. The vulnerability's high CVSS score reflects its potential for severe damage if exploited.

Mitigation Recommendations

To mitigate CVE-2026-28784, organizations should immediately upgrade Craft CMS to versions 5.8.22 or 4.16.18 or later, which contain the necessary patches. Additionally, organizations should adhere strictly to the vendor's recommendation to disable allowAdminChanges in all non-development environments to reduce the attack surface. Access controls should be reviewed and tightened to limit administrator and System Messages utility access only to trusted personnel. Implementing multi-factor authentication (MFA) for all CMS accounts with elevated privileges can reduce the risk of account compromise. Regularly audit CMS user roles and permissions to detect and remove unnecessary privileges. Monitoring and logging of CMS control panel activities should be enhanced to detect suspicious behavior indicative of exploitation attempts. Employ web application firewalls (WAFs) with rules targeting known Craft CMS vulnerabilities and suspicious Twig template payloads. Finally, conduct periodic security assessments and penetration testing focused on CMS components to identify and remediate potential weaknesses proactively.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-03T14:25:19.244Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69a8695ad1a09e29cb4e1dc5

Added to database: 3/4/2026, 5:18:18 PM

Last enriched: 3/4/2026, 5:32:39 PM

Last updated: 3/4/2026, 8:01:22 PM

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses