A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-45697

CVE-2026-45697: Craft CMS Formie Plugin RCE Vulnerability

CVE-2026-45697 is a remote code execution vulnerability in the Formie plugin for Craft CMS that allows unauthenticated attackers to exploit Twig template injection. This article covers technical details, affected versions, and patches.

Published: June 4, 2026

CVE-2026-45697 Overview

CVE-2026-45697 is a server-side template injection vulnerability in Formie, a Craft CMS plugin for building forms. Versions prior to 2.2.20 and 3.1.24 evaluate unauthenticated user input as Twig template code during form submission handling. Attackers can submit crafted values into Hidden fields configured with a Default value of Custom, which the plugin then renders through the Twig engine. Successful exploitation can lead to remote code execution and full compromise of the Craft CMS site, depending on the template sandbox configuration. The issue is classified as Code Injection [CWE-94] and is fixed in Formie 2.2.20 and 3.1.24.

Critical Impact

Unauthenticated attackers can inject Twig expressions through form submissions, potentially executing arbitrary code on the Craft CMS host.

Affected Products

  • Formie plugin for Craft CMS versions prior to 2.2.20
  • Formie plugin for Craft CMS 3.x versions prior to 3.1.24
  • Craft CMS sites using Formie forms with Hidden fields and Custom default values

Discovery Timeline

  • 2026-05-29 - CVE-2026-45697 published to NVD
  • 2026-05-29 - Last updated in NVD database

Technical Details for CVE-2026-45697

Vulnerability Analysis

Formie processes form submissions and substitutes Default values for Hidden fields before persisting the submission. When a Hidden field is configured with a Default value type of Custom, the plugin passes the submitted value through Twig template rendering instead of treating it as a literal string. Because the rendering happens during normal form submission handling, no authentication is required to reach the vulnerable code path.

An attacker who identifies a Formie form containing a Hidden field with this configuration can override the field value in the POST request. The submitted payload is then parsed and executed as Twig markup on the server. The effective impact depends on how Craft CMS's Twig sandbox is configured for the site, but server-side template injection in Twig commonly enables arbitrary PHP function invocation and shell command execution.

Root Cause

The root cause is unsafe evaluation of attacker-controlled input as Twig template source. Submission values originating from the HTTP request body should be treated as untrusted data, but Formie's Hidden field handler renders them through the template engine when the Default value type is set to Custom. The plugin lacks input validation and does not enforce a strict template sandbox boundary for untrusted submission data.

Attack Vector

Exploitation is performed over the network with no authentication and no user interaction. An attacker enumerates publicly accessible Formie forms, inspects the rendered HTML for Hidden field names, and submits a crafted POST request containing a Twig expression in place of the expected hidden value. The malicious payload is then evaluated server-side, returning template output or triggering side effects such as command execution. Refer to the GitHub Security Advisory GHSA-x7m9-mwc2-g6w2 and the GitHub Formie Commit for technical details on the vulnerable code path and fix.

Detection Methods for CVE-2026-45697

Indicators of Compromise

  • Form submission POST requests containing Twig delimiters such as {{, }}, {%, or %} in Hidden field values
  • Unexpected outbound network connections or new shell processes spawned by the PHP-FPM or web server worker process
  • Web access logs showing repeated submissions to Formie endpoints under /index.php?p=actions/formie/submissions/submit
  • Newly created PHP files, scheduled tasks, or modifications to the Craft CMS storage/ or templates/ directories following form submission activity

Detection Strategies

  • Inspect Formie form configurations in the Craft control panel and flag any Hidden fields with Default value type set to Custom
  • Deploy web application firewall rules that block Twig syntax tokens within Formie submission parameters
  • Audit application and PHP error logs for Twig parsing exceptions originating from Formie submission handlers
  • Correlate web request telemetry with endpoint process execution to identify shell or interpreter children of the web server

Monitoring Recommendations

  • Enable verbose logging on Craft CMS and forward access logs to a centralized analytics platform for anomaly review
  • Monitor for unexpected child processes of php-fpm, httpd, or nginx such as sh, bash, curl, or wget
  • Alert on file integrity changes within Craft CMS web roots and Formie plugin directories
  • Track outbound DNS and HTTP traffic from web server hosts to detect post-exploitation callbacks

How to Mitigate CVE-2026-45697

Immediate Actions Required

  • Upgrade Formie to version 2.2.20 (2.x branch) or 3.1.24 (3.x branch) without delay
  • Review every form for Hidden fields configured with Default value type Custom and replace with static values where possible
  • Rotate Craft CMS security keys and any credentials accessible from the web application environment if exploitation is suspected
  • Inspect submission logs and server processes for indicators of post-exploitation activity

Patch Information

The maintainers released fixes in Formie 2.2.20 and Formie 3.1.24. The corrective change is documented in the Formie commit f690d56, which removes Twig evaluation of untrusted Hidden field submission values.

Workarounds

  • Temporarily remove or disable forms containing Hidden fields configured with Custom Twig default values until upgrades are applied
  • Apply a web application firewall rule that rejects requests where Formie submission parameters contain Twig syntax tokens
  • Restrict the Craft CMS Twig sandbox configuration to deny dangerous tags and functions for any user-rendered context
bash
# Upgrade Formie via Composer to a patched release
composer require verbb/formie:^3.1.24
# Or for the 2.x branch
composer require verbb/formie:^2.2.20

# Clear Craft CMS caches after upgrading
php craft clear-caches/all

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.8

  • EPSS Probability0.13%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-94
  • Technical References
  • GitHub Formie Commit Note

  • GitHub Formie Release 2.2.20

  • GitHub Formie Release 3.1.24

  • GitHub Security Advisory GHSA-x7m9-mwc2-g6w2
  • Related CVEs
  • CVE-2026-44011: Craft CMS Remote Code Execution Vulnerability

  • 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
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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