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
    • 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-2025-66294

CVE-2025-66294: Getgrav Grav RCE Vulnerability

CVE-2025-66294 is a remote code execution flaw in Getgrav Grav caused by Server-Side Template Injection. Attackers with editor permissions can execute arbitrary commands on the server. This article covers technical details, affected versions, impact, and mitigation strategies.

Updated: January 22, 2026

CVE-2025-66294 Overview

CVE-2025-66294 is a high-severity Server-Side Template Injection (SSTI) vulnerability in Grav, a popular open-source file-based Web platform. This vulnerability allows authenticated attackers with editor permissions to execute arbitrary commands on the server. Under certain conditions, it may also be exploited by unauthenticated attackers, significantly increasing the risk profile of affected installations.

The vulnerability stems from weak regex validation in the cleanDangerousTwig method, which fails to properly sanitize user-controlled input before it is processed by the Twig templating engine. With a CVSS score of 8.7 and an EPSS probability of 47.06% (97th percentile), this vulnerability presents a significant risk to organizations running vulnerable versions of Grav CMS.

Critical Impact

Attackers can achieve remote code execution on vulnerable Grav installations, potentially leading to complete server compromise, data exfiltration, and lateral movement within the network.

Affected Products

  • Grav CMS versions prior to 1.8.0-beta.27
  • Grav CMS 1.8.0-beta1 through 1.8.0-beta26
  • All stable Grav releases prior to the patched version

Discovery Timeline

  • December 1, 2025 - CVE-2025-66294 published to NVD
  • December 4, 2025 - Last updated in NVD database

Technical Details for CVE-2025-66294

Vulnerability Analysis

This Server-Side Template Injection vulnerability (CWE-94: Improper Control of Generation of Code) exists within Grav's Twig template processing functionality. Grav utilizes the Twig templating engine to render dynamic content, and the platform implements a cleanDangerousTwig method intended to sanitize potentially dangerous template directives before execution.

The vulnerability carries a CVSS 4.0 vector of CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N, indicating:

  • Network-based attack vector - Exploitable remotely over the network
  • Low attack complexity - No specialized conditions required
  • Low privileges required - Authenticated users with editor permissions can exploit this
  • No user interaction needed - Exploitation can occur without victim involvement
  • High impact on confidentiality, integrity, and availability - Complete system compromise possible

Root Cause

The root cause of CVE-2025-66294 lies in the insufficient regex-based validation implemented within the cleanDangerousTwig method. This method was designed to filter out potentially dangerous Twig template constructs before they are processed by the templating engine. However, the regex patterns used for validation are too permissive, allowing attackers to craft payloads that bypass the sanitization logic.

Template injection vulnerabilities occur when user input is embedded into template strings that are subsequently evaluated by the template engine. In Twig, attackers can leverage various built-in functions and filters to execute arbitrary PHP code on the server. The weak regex validation fails to account for all possible encoding variations, whitespace manipulation, and alternative syntax constructs that can be used to bypass the filter.

Attack Vector

The attack vector for CVE-2025-66294 is network-based and requires the attacker to have authenticated access with editor permissions in the Grav admin panel. Once authenticated, the attacker can inject malicious Twig template code through content editing interfaces.

The exploitation flow involves:

  1. Attacker authenticates to the Grav admin panel with editor-level privileges
  2. Attacker crafts a malicious Twig template payload designed to bypass the cleanDangerousTwig regex validation
  3. The malicious payload is submitted through a content editing interface
  4. The Twig engine processes the unsanitized payload, executing arbitrary code on the server
  5. The attacker gains command execution capabilities on the underlying server

Under certain conditions, unauthenticated attackers may also exploit this vulnerability, potentially through cached content or misconfigured access controls. See the security advisory at https://github.com/getgrav/grav/security/advisories/GHSA-662m-56v4-3r8f for detailed technical information on exploitation methods.

Detection Methods for CVE-2025-66294

Indicators of Compromise

  • Unusual Twig template syntax in page content or configuration files
  • Unexpected PHP function calls in server access logs
  • Anomalous process spawning from web server processes (e.g., php-fpm, apache2, nginx)
  • New files created in web directories with suspicious content
  • Outbound network connections from web server to unusual destinations

Detection Strategies

Organizations should implement multi-layered detection strategies to identify potential exploitation attempts:

Web Application Firewall (WAF) Rules: Configure WAF rules to detect and block common SSTI payloads targeting Twig templating engine. Look for patterns containing Twig delimiters ({{, }}, {%, %}) combined with dangerous functions like system, exec, passthru, or filter constructs.

Log Analysis: Monitor web application logs for requests containing encoded or obfuscated Twig syntax. Pay particular attention to POST requests to admin panel endpoints that handle content editing.

File Integrity Monitoring: Implement file integrity monitoring on Grav installation directories to detect unauthorized modifications to template files or the creation of new executable content.

Behavioral Analysis: Monitor for anomalous behavior patterns such as web server processes executing system commands, spawning child processes, or establishing outbound network connections.

Monitoring Recommendations

Security teams should implement continuous monitoring for the following:

  1. Admin Panel Activity: Log and alert on content modifications made through the Grav admin panel, particularly those containing template syntax
  2. Process Monitoring: Use endpoint detection and response (EDR) solutions to monitor for suspicious process chains originating from web server processes
  3. Network Traffic Analysis: Monitor for command-and-control traffic patterns and data exfiltration attempts from web servers
  4. Version Tracking: Maintain an inventory of Grav installations and their versions to quickly identify vulnerable systems

How to Mitigate CVE-2025-66294

Immediate Actions Required

  • Upgrade Grav CMS to version 1.8.0-beta.27 or later immediately
  • Review admin panel access logs for suspicious activity
  • Audit user accounts with editor or higher permissions
  • Implement Web Application Firewall (WAF) rules to block SSTI payloads
  • Enable enhanced logging on Grav installations pending upgrade

Patch Information

The vulnerability is addressed in Grav version 1.8.0-beta.27. The security patch improves the regex validation in the cleanDangerousTwig method to properly sanitize dangerous Twig template constructs.

Patch Commit: The fix is available in commit e37259527d9c1deb6200f8967197a9fa587c6458

Patch URL: https://github.com/getgrav/grav/commit/e37259527d9c1deb6200f8967197a9fa587c6458

Organizations should prioritize upgrading to the patched version. Review the vendor security advisory at https://github.com/getgrav/grav/security/advisories/GHSA-662m-56v4-3r8f for complete upgrade instructions and additional security recommendations.

Workarounds

If immediate patching is not possible, organizations should implement the following temporary mitigations:

Restrict Admin Access: Limit access to the Grav admin panel by IP address using web server configuration or firewall rules. Only allow trusted administrative IP addresses to access the /admin endpoint.

Review User Permissions: Audit all user accounts with editor permissions and remove access from any accounts that do not require content editing capabilities.

Enable Two-Factor Authentication: If available, enable two-factor authentication for all admin panel accounts to reduce the risk of unauthorized access.

Deploy WAF Protection: Implement Web Application Firewall rules specifically designed to detect and block Server-Side Template Injection payloads targeting Twig.

bash
# Example: Restrict admin access by IP in Apache .htaccess
<Location /admin>
    Require ip 192.168.1.0/24
    Require ip 10.0.0.0/8
</Location>

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechGetgrav

  • SeverityHIGH

  • CVSS Score8.7

  • EPSS Probability47.06%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/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-94
  • Vendor Resources
  • Patch

  • Exploit, Vendor Advisory
  • Related CVEs
  • CVE-2025-66297: Getgrav Grav CMS RCE Vulnerability

  • CVE-2025-66299: Getgrav Grav SSTI RCE Vulnerability

  • CVE-2025-66295: Getgrav Grav Path Traversal Vulnerability

  • CVE-2025-66296: Getgrav Grav Privilege Escalation Flaw
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