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-28697: CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine in craftcms cms

0
Critical
VulnerabilityCVE-2026-28697cvecve-2026-28697cwe-1336
Published: Wed Mar 04 2026 (03/04/2026, 16:26:37 UTC)
Source: CVE Database V5
Vendor/Project: craftcms
Product: cms

Description

CVE-2026-28697 is a critical Server-Side Template Injection (SSTI) vulnerability in Craft CMS versions prior to 4. 17. 0-beta. 1 and 5. 9. 0-beta. 1. An authenticated administrator can inject malicious payloads into Twig template fields, such as Email Templates, enabling Remote Code Execution (RCE). Exploitation allows writing arbitrary PHP scripts to web-accessible directories via the craft. app.

AI-Powered Analysis

AILast updated: 03/04/2026, 17:03:02 UTC

Technical Analysis

CVE-2026-28697 is a critical vulnerability classified under CWE-1336, involving improper neutralization of special elements in the Twig template engine used by Craft CMS. The flaw exists in versions prior to 4.17.0-beta.1 and 5.9.0-beta.1. An authenticated administrator can exploit this Server-Side Template Injection (SSTI) vulnerability by injecting malicious code into template fields such as Email Templates. The injected payload can leverage the craft.app.fs.write() method to write arbitrary PHP scripts into web-accessible directories. Once written, these scripts can be accessed via a browser, allowing the attacker to execute arbitrary system commands on the underlying server, effectively achieving Remote Code Execution (RCE). The vulnerability does not require additional user interaction beyond administrator authentication, making it highly dangerous in environments where admin credentials are compromised or misused. The issue arises from insufficient sanitization or neutralization of template input fields, allowing special elements to be interpreted and executed by the Twig engine. This vulnerability is fixed starting from Craft CMS versions 4.17.0-beta.1 and 5.9.0-beta.1. Although no public exploits have been reported yet, the high CVSS score (9.4) indicates a critical risk due to the combination of network attack vector, low attack complexity, no user interaction, and high impact on confidentiality, integrity, and availability.

Potential Impact

The impact of CVE-2026-28697 is severe for organizations using vulnerable Craft CMS versions. Successful exploitation results in Remote Code Execution, allowing attackers to execute arbitrary commands on the web server with the privileges of the CMS process. This can lead to full system compromise, data theft, defacement, deployment of malware or ransomware, lateral movement within the network, and disruption of services. Since the vulnerability requires administrator authentication, the risk is elevated in environments where admin credentials are weak, reused, or compromised. Organizations relying on Craft CMS for critical web content or customer-facing services face significant operational and reputational damage if exploited. Additionally, the ability to write PHP scripts to web-accessible directories increases the attack surface and persistence options for adversaries. The vulnerability affects both confidentiality and integrity of data, as well as availability of services, making it a critical threat to affected organizations worldwide.

Mitigation Recommendations

To mitigate CVE-2026-28697, organizations should immediately upgrade Craft CMS to versions 4.17.0-beta.1 or later, or 5.9.0-beta.1 or later, where the vulnerability is patched. Until upgrades are applied, restrict administrator access to trusted personnel only and enforce strong authentication mechanisms such as multi-factor authentication (MFA) to reduce the risk of credential compromise. Review and audit administrator accounts and permissions regularly. Implement strict input validation and sanitization policies for template fields if custom modifications exist. Monitor web server directories for unauthorized PHP files and implement file integrity monitoring to detect suspicious changes. Employ web application firewalls (WAFs) with rules targeting SSTI patterns to provide additional protection. Conduct regular security assessments and penetration tests focusing on CMS components. Finally, maintain comprehensive logging and alerting to detect anomalous administrator activities or unexpected file writes.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-02T21:43:19.928Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69a86252d1a09e29cb4c063c

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

Last enriched: 3/4/2026, 5:03:02 PM

Last updated: 3/4/2026, 6:04:11 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