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-2025-66299

CVE-2025-66299: Getgrav Grav SSTI RCE Vulnerability

CVE-2025-66299 is a Server-Side Template Injection vulnerability in Getgrav Grav CMS that allows authenticated editors to execute arbitrary code by bypassing security sandboxes. This article covers technical details, affected versions, impact, and mitigation steps.

Updated: May 15, 2026

CVE-2025-66299 Overview

CVE-2025-66299 is a Server-Side Template Injection (SSTI) vulnerability in Grav CMS, a file-based web platform developed by Getgrav. The flaw affects all Grav versions prior to 1.8.0-beta.27. An authenticated user with editor permissions can inject malicious Twig template directives that interact with the Twig object, bypassing the existing security sandbox. The attacker can write to the system.twig.safe_filters attribute and register arbitrary functions, leading to remote code execution on the underlying server. The vulnerability is classified under CWE-94 (Improper Control of Generation of Code).

Critical Impact

Authenticated editors can bypass the Grav security sandbox via Twig SSTI and execute arbitrary code on the host, compromising confidentiality, integrity, and availability of the web platform.

Affected Products

  • Getgrav Grav versions prior to 1.8.0-beta.27
  • All Grav 1.8.0 beta releases from beta1 through beta26
  • Grav CMS instances exposing editor-role accounts to untrusted users

Discovery Timeline

  • 2025-12-01 - CVE-2025-66299 published to NVD
  • 2025-12-03 - Last updated in NVD database

Technical Details for CVE-2025-66299

Vulnerability Analysis

Grav CMS uses the Twig templating engine to render page content. To prevent template-based attacks, Grav enforces a security sandbox that restricts which filters, functions, and objects can be invoked from authored templates. The sandbox, however, does not fully isolate the Twig object itself. An attacker with editor permissions can craft Twig directives inside page content that reach the Twig object, call its methods, and read or write its attributes. By writing to system.twig.safe_filters, the attacker adds arbitrary PHP functions to the allowlist, effectively neutralizing the sandbox and enabling arbitrary code execution on the server.

Root Cause

The root cause is incomplete sandbox coverage in the Twig integration layer. The Twig object remains reachable from rendered templates, and its attribute mutators are not protected against writes from sandboxed contexts. This allows authenticated editors to mutate runtime configuration that controls which filters Twig considers safe, defeating the input validation the sandbox is intended to provide.

Attack Vector

Exploitation requires network access to the Grav web interface and an authenticated session with editor privileges. The attacker submits a page or content payload containing malicious Twig directives. When Grav renders the content, the directives execute against the unprotected Twig object, mutate system.twig.safe_filters, and chain into execution of attacker-supplied PHP functions. No user interaction is required beyond the attacker's own authenticated requests.

No public proof-of-concept code is available at this time. Technical specifics are documented in the GitHub Security Advisory GHSA-gjc5-8cfh-653x and the upstream fix commit e372595.

Detection Methods for CVE-2025-66299

Indicators of Compromise

  • Page content, frontmatter, or Twig templates containing references to system.twig.safe_filters, _self, or unusual attribute accessors on the Twig object
  • New or unexpected entries in the Grav configuration file system.yaml under twig.safe_filters
  • Web server processes spawning unexpected child processes such as sh, bash, php -r, or network utilities under the PHP-FPM or web server user
  • Outbound network connections originating from the web server immediately following content edits by editor accounts

Detection Strategies

  • Audit Grav page content and the user/config/system.yaml file for unsanctioned Twig directives or modifications to safe_filters
  • Review web server access logs for POST requests to admin save endpoints correlated with subsequent anomalous process activity
  • Enable application-level logging of Twig rendering errors and sandbox security exceptions

Monitoring Recommendations

  • Monitor authenticated editor sessions for content submissions containing Twig syntax such as {{, }}, and attribute() calls referencing system objects
  • Alert on PHP processes invoking shell interpreters, file-system writes outside the Grav user directory, or unexpected outbound connections
  • Track changes to the Grav installation directory and configuration files using file integrity monitoring

How to Mitigate CVE-2025-66299

Immediate Actions Required

  • Upgrade Grav CMS to version 1.8.0-beta.27 or later, which contains the fix committed in e37259527d9c1deb6200f8967197a9fa587c6458
  • Audit all accounts with editor permissions and revoke access from users who do not require content authoring rights
  • Review existing page content and system.yaml for unauthorized Twig directives or safe_filters additions and revert any unexpected changes
  • Rotate credentials for editor accounts and any secrets accessible from the web server filesystem if compromise is suspected

Patch Information

The vendor fixed CVE-2025-66299 in Grav 1.8.0-beta.27. The patch is published in the upstream repository as commit e37259527d9c1deb6200f8967197a9fa587c6458. Administrators should consult the GitHub Security Advisory GHSA-gjc5-8cfh-653x for the full vendor write-up and verify their deployment after upgrading.

Workarounds

  • Restrict the editor role to fully trusted users until the upgrade is applied
  • Place the Grav admin interface behind network-level access controls such as VPN or IP allowlisting to limit exposure
  • Deploy a web application firewall rule to inspect content submissions for Twig directives referencing safe_filters or attribute writes on system objects
bash
# Upgrade Grav to a patched release
cd /path/to/grav
bin/gpm selfupgrade
# Verify the running version is 1.8.0-beta.27 or later
bin/grav --version

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechGetgrav Grav

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability0.15%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-94
  • Technical References
  • GitHub Security Advisory
  • Vendor Resources
  • GitHub Commit Details
  • Related CVEs
  • CVE-2026-42611: Getgrav Grav RCE Vulnerability

  • CVE-2025-66297: Getgrav Grav CMS RCE Vulnerability

  • CVE-2026-42608: Getgrav Grav Path Traversal Vulnerability

  • CVE-2026-42612: Getgrav Grav XSS 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