The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-28697

CVE-2026-28697: Craft CMS RCE Vulnerability

CVE-2026-28697 is a remote code execution flaw in Craft CMS allowing authenticated admins to inject SSTI payloads into Twig templates. This article covers the technical details, affected versions, and mitigation strategies.

Published: March 6, 2026

CVE-2026-28697 Overview

CVE-2026-28697 is a critical Server-Side Template Injection (SSTI) vulnerability in Craft CMS that enables authenticated administrators to achieve Remote Code Execution (RCE). The vulnerability exists in Twig template fields, such as Email Templates, where an attacker can inject malicious SSTI payloads. By leveraging the craft.app.fs.write() method, attackers can write a malicious PHP script to a web-accessible directory and subsequently execute arbitrary system commands by accessing the script via a browser.

Critical Impact

An authenticated administrator can achieve full Remote Code Execution on the underlying server, potentially leading to complete system compromise, data exfiltration, and lateral movement within the infrastructure.

Affected Products

  • Craft CMS versions prior to 4.17.0-beta.1 (version 4.x branch)
  • Craft CMS versions prior to 5.9.0-beta.1 (version 5.x branch)
  • All Craft CMS 4.0.0 release candidates (rc1, rc2, rc3)

Discovery Timeline

  • 2026-03-04 - CVE-2026-28697 published to NVD
  • 2026-03-05 - Last updated in NVD database

Technical Details for CVE-2026-28697

Vulnerability Analysis

This vulnerability stems from improper handling of user-supplied input within Twig template rendering contexts in Craft CMS. Craft CMS utilizes the Twig templating engine for rendering dynamic content, including email templates and other customizable fields accessible to administrators. The application fails to adequately sanitize or restrict the Twig functions and methods available within these template contexts, allowing an authenticated administrator to inject arbitrary Twig expressions that execute server-side code.

The exploitation chain involves two critical steps: first, the attacker injects an SSTI payload that calls internal Craft CMS methods, specifically craft.app.fs.write(), to write a malicious PHP file to a web-accessible directory. Second, the attacker accesses this newly created PHP file via HTTP request, triggering arbitrary command execution on the server. This attack pattern is particularly dangerous because it converts administrative access into full system-level code execution.

Root Cause

The root cause of CVE-2026-28697 is classified under CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine). The vulnerability arises because Craft CMS exposes powerful internal application methods through the Twig template context without proper restrictions. The craft.app.fs.write() method, which provides file system write capabilities, should not be accessible from user-controllable template fields. The lack of a sandbox or allowlist for available methods in administrator-controllable template contexts enables this exploitation path.

Attack Vector

The attack is executed over the network and requires authenticated access with administrator privileges. The attacker navigates to a template field within the Craft CMS admin panel, such as Email Templates, and injects a Server-Side Template Injection payload. The payload leverages the Twig templating syntax to call the craft.app.fs.write() method, writing a PHP webshell or other malicious script to a publicly accessible directory within the web root.

Once the malicious PHP file is written to disk, the attacker can access it directly via an HTTP request to execute arbitrary system commands. While the vulnerability requires administrator authentication, it significantly escalates the impact of compromised admin credentials from application-level access to full server compromise. Organizations should consider this vulnerability particularly critical in multi-tenant environments or where administrator accounts may be shared or poorly secured.

For detailed technical analysis and proof-of-concept information, refer to the GitHub Security Advisory GHSA-v47q-jxvr-p68x.

Detection Methods for CVE-2026-28697

Indicators of Compromise

  • Unexpected PHP files appearing in web-accessible directories, particularly with recent modification timestamps
  • Anomalous HTTP requests to newly created PHP files that were not part of the original Craft CMS installation
  • Twig template configurations containing suspicious method calls such as craft.app.fs.write() or references to PHP file extensions
  • Unusual outbound network connections or command execution patterns originating from the web server process

Detection Strategies

  • Implement file integrity monitoring (FIM) on web-accessible directories to detect unauthorized file creation or modification
  • Review Craft CMS admin audit logs for template modifications, particularly those containing filesystem-related method calls
  • Deploy web application firewall (WAF) rules to detect SSTI patterns in request payloads targeting Craft CMS admin endpoints
  • Monitor PHP process behavior for unexpected child processes or command execution patterns

Monitoring Recommendations

  • Enable comprehensive logging for Craft CMS administrative actions, including template field modifications
  • Implement real-time alerting for new file creation in web root directories outside of normal deployment workflows
  • Deploy endpoint detection and response (EDR) solutions to monitor for post-exploitation behaviors following potential RCE
  • Regularly audit administrator account access and authentication events for signs of credential compromise

How to Mitigate CVE-2026-28697

Immediate Actions Required

  • Upgrade Craft CMS to version 4.17.0-beta.1 or later for the 4.x branch
  • Upgrade Craft CMS to version 5.9.0-beta.1 or later for the 5.x branch
  • Review all existing email templates and custom template fields for suspicious SSTI payloads
  • Audit administrator accounts and enforce strong authentication, including multi-factor authentication (MFA)
  • Conduct a forensic review of web-accessible directories for unauthorized PHP files

Patch Information

Craft CMS has addressed this vulnerability in versions 4.17.0-beta.1 and 5.9.0-beta.1. The fix restricts access to dangerous internal methods from the Twig template context, preventing the exploitation of SSTI payloads to achieve code execution.

For technical details on the security patches, see:

  • GitHub Commit 9dc2a4a
  • GitHub Pull Request #18216
  • GitHub Pull Request #18219

Workarounds

  • Restrict administrator access to trusted personnel only and implement the principle of least privilege for admin accounts
  • Deploy a Web Application Firewall (WAF) with rules to block SSTI patterns in requests to admin endpoints
  • Implement file system permissions that prevent the web server process from writing to web-accessible directories where possible
  • Consider placing the Craft CMS admin panel behind additional authentication layers such as VPN or IP allowlisting
bash
# Example: Restrict write permissions on web-accessible directories
chmod 755 /var/www/html/web
chown root:root /var/www/html/web
# Ensure web server cannot write to web root
find /var/www/html/web -type d -exec chmod 755 {} \;
find /var/www/html/web -type f -exec chmod 644 {} \;

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechCraft Cms

  • SeverityCRITICAL

  • CVSS Score9.4

  • EPSS Probability0.28%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS: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
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-1336
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Pull Request #18216

  • GitHub Pull Request #18219

  • GitHub Security Advisory GHSA-v47q-jxvr-p68x
  • Related CVEs
  • CVE-2026-33157: Craftcms Craft CMS RCE Vulnerability

  • CVE-2026-32264: Craft CMS Behavior Injection RCE Vulnerability

  • CVE-2026-32261: Webhooks for Craft CMS RCE Vulnerability

  • CVE-2026-31857: Craft CMS RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English