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-66297

CVE-2025-66297: Getgrav Grav CMS RCE Vulnerability

CVE-2025-66297 is a remote code execution flaw in Getgrav Grav CMS allowing authenticated users to execute arbitrary commands via Twig injection. This article covers technical details, affected versions, impact, and mitigation.

Updated: May 15, 2026

CVE-2025-66297 Overview

CVE-2025-66297 affects Grav, a file-based Web platform written in PHP. Versions prior to 1.8.0-beta.27 allow authenticated users with page creation or editing permissions to enable Twig processing in page frontmatter. Attackers can inject malicious Twig expressions to escalate privileges to administrator or execute arbitrary system commands through the scheduler API. The flaw chains a privilege escalation (PE) with remote code execution (RCE) on the underlying host. The vulnerability is tracked as [CWE-1336] (Improper Neutralization of Special Elements Used in a Template Engine) and is fixed in Grav 1.8.0-beta.27.

Critical Impact

Authenticated admin panel users with page editing rights can execute arbitrary OS commands and elevate to administrator on Grav CMS instances.

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 deployments exposing the admin panel to lower-privileged content editors

Discovery Timeline

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

Technical Details for CVE-2025-66297

Vulnerability Analysis

Grav uses the Twig templating engine to render pages and supports a process.twig flag in page frontmatter. When enabled, Grav evaluates Twig expressions embedded inside page content. The admin panel grants page creation and editing rights to non-administrator roles, which allows those users to toggle Twig processing on their own pages. Once Twig evaluation is active, the user controls the input to a server-side template engine. The attacker leverages Twig server-side template injection (SSTI) to read or modify privileged objects, escalate the current account to administrator, and reach the scheduler API to invoke arbitrary system commands.

Root Cause

The root cause is missing privilege separation between page authoring and template execution. Grav treats process.twig as a content-author setting rather than an administrative capability. Any account permitted to edit page frontmatter can opt into Twig evaluation, turning user-supplied page content into executable server-side code. See the GitHub Security Advisory GHSA-858q-77wx-hhx6 for the maintainer analysis.

Attack Vector

Exploitation requires network access to the admin panel and a valid account with page create or edit permissions. The attacker creates or edits a page, enables Twig processing in the frontmatter, and embeds Twig expressions that invoke PHP runtime objects. Rendering the page executes the injected expressions in the web server process context. From there the attacker abuses the scheduler API to register or trigger jobs that run arbitrary shell commands. The fix commit e3725952 restricts who can enable Twig processing and tightens scheduler API authorization. No public proof-of-concept exploit is currently available.

Detection Methods for CVE-2025-66297

Indicators of Compromise

  • Page frontmatter files (*.md) on disk containing process: twig: true authored by non-admin accounts
  • New or modified entries in user/config/scheduler.yaml referencing unexpected shell commands or binaries
  • Web server processes (php-fpm, apache2, nginx workers) spawning child processes such as sh, bash, curl, or wget
  • Admin panel audit entries showing role changes to administrator from accounts that previously held editor-only rights

Detection Strategies

  • Inventory all Grav installations and flag versions below 1.8.0-beta.27 using software composition analysis or CPE matching against cpe:2.3:a:getgrav:grav.
  • Scan the Grav user/pages directory for frontmatter that enables Twig processing and correlate the author against the user role.
  • Monitor HTTP requests to /admin/pages and scheduler endpoints for unusual POST bodies containing Twig syntax such as {{ and {%.

Monitoring Recommendations

  • Alert on file modifications to user/config/scheduler.yaml and any new cron-like job definitions registered through Grav.
  • Log and review every admin panel authentication and authorization change, especially role escalations.
  • Capture process-lineage telemetry from the web server account to detect unexpected command execution downstream of PHP.

How to Mitigate CVE-2025-66297

Immediate Actions Required

  • Upgrade Grav to version 1.8.0-beta.27 or later on all instances.
  • Audit every admin panel account and remove page edit rights from users who do not require them.
  • Review existing pages for process.twig: true set by non-administrator users and revert unauthorized changes.
  • Rotate admin credentials and API tokens if unauthorized scheduler entries or role changes are found.

Patch Information

The fix is delivered in Grav 1.8.0-beta.27. The maintainer commit e37259527d9c1deb6200f8967197a9fa587c6458 restricts Twig processing in page frontmatter to privileged users and hardens the scheduler API. Full advisory details are published in GHSA-858q-77wx-hhx6.

Workarounds

  • Restrict admin panel access to administrator accounts only until the patched release is deployed.
  • Place the /admin route behind network controls such as IP allowlists, a VPN, or a reverse proxy with authentication.
  • Disable the scheduler feature in environments where it is not required to reduce the RCE attack surface.
bash
# Configuration example
composer require getgrav/grav:^1.8.0-beta.27
# Verify installed version
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 Score7.4

  • EPSS Probability0.47%

  • 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:P/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
  • Technical References
  • GitHub Security Advisory
  • Vendor Resources
  • GitHub Commit Details
  • Related CVEs
  • CVE-2026-42611: Getgrav Grav RCE Vulnerability

  • CVE-2025-66299: Getgrav Grav SSTI 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