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

CVE-2026-42607: Grav CMS RCE Vulnerability

CVE-2026-42607 is a remote code execution vulnerability in Grav CMS allowing authenticated admins to upload malicious ZIP files. This article covers technical details, affected versions, impact, and mitigation.

Published: May 18, 2026

CVE-2026-42607 Overview

CVE-2026-42607 is a code injection vulnerability in Grav, a file-based PHP web platform. An authenticated administrator can achieve Remote Code Execution (RCE) by uploading a crafted ZIP archive through the Direct Install tool. Grav blocks direct .php uploads but does not inspect the contents of ZIP archives before extraction. Attackers can package malicious PHP files inside a plugin or theme archive, and the extracted code executes within the web server context. The flaw is tracked as CWE-94: Improper Control of Generation of Code and is fixed in Grav 2.0.0-beta.2.

Critical Impact

An authenticated admin can drop a persistent web shell or execute arbitrary PHP on the server, leading to full compromise of the Grav installation and the underlying host context.

Affected Products

  • Grav CMS versions prior to 2.0.0-beta.2
  • Grav installations exposing the Admin plugin with Direct Install enabled
  • Self-hosted PHP deployments running vulnerable Grav releases

Discovery Timeline

  • 2026-05-11 - CVE-2026-42607 published to NVD
  • 2026-05-12 - Last updated in NVD database

Technical Details for CVE-2026-42607

Vulnerability Analysis

Grav's Direct Install tool accepts ZIP packages that represent plugins or themes. The installer rejects standalone .php uploads but treats ZIP archives as opaque containers. The archive contents are extracted to the plugin or theme directory without restricting PHP entries or validating package provenance. Once extracted, any included PHP file becomes loadable through Grav's plugin lifecycle or directly via the web server.

The upstream patch in commit 5a12f9b adds path validation to system/src/Grav/Common/GPM/Installer.php. The commit notes explicitly state the path hardening does not defend against a well-formed but malicious plugin whose PHP code is the payload; that residual trust decision now belongs to the administrator invoking directInstall.

Root Cause

The root cause is missing content inspection on uploaded archives. The Direct Install workflow assumes ZIP packages originate from trusted sources, so it neither verifies signatures nor scans entries for executable payloads. This violates [CWE-94] by allowing attacker-controlled code to enter the application's execution path.

Attack Vector

Exploitation requires valid credentials with administrative privileges over the Admin panel. The attacker crafts a ZIP that mimics a Grav plugin structure, embeds a PHP web shell or malicious bootstrap, and uploads it through Direct Install. Grav extracts the archive into user/plugins/ or user/themes/, after which the payload runs under the web server user.

php
// Patch excerpt: system/src/Grav/Common/GPM/Installer.php
$archive = $zip->open($zip_file);

if ($archive === true) {
    // GHSA-w48r-jppp-rcfw: validate every entry name before extraction.
    // ZipArchive::extractTo would otherwise honour `../` segments and
    // absolute paths, letting a crafted plugin/theme ZIP write files
    // anywhere the web server can reach (Zip Slip, CVE-2018-1000544
    // family). Note: this hardens the path layer; it does NOT and
    // cannot defend against a well-formed but malicious plugin whose
    // own PHP code is the payload — that's a "trust the source"
    // problem the admin must own when using directInstall.
    $numFiles = $zip->numFiles;
    for ($i = 0; $i < $numFiles; $i++) {
        $entryName = (string) $zip->getNameIndex($i);
        if (!self::isSafeArchiveEntry($entryName)) {
            self::$error = self::ZIP_EXTRACT_ERROR;
            $zip->close();
            return false;
        }
    }

    Folder::create($destination);
    $unzip = $zip->extractTo($destination);

Source: getgrav/grav commit 5a12f9b

Detection Methods for CVE-2026-42607

Indicators of Compromise

  • New or modified PHP files under user/plugins/ or user/themes/ with recent write timestamps not tied to a known release
  • Admin panel audit entries referencing Direct Install followed by outbound network connections from the PHP process
  • Unexpected child processes (sh, bash, python) spawned from the PHP-FPM or Apache worker servicing Grav
  • Web access log entries hitting plugin paths that return executed output rather than static assets

Detection Strategies

  • Monitor file integrity on the Grav user/plugins/ and user/themes/ directories and alert on PHP file creation outside maintenance windows
  • Inspect web server logs for POST requests to the admin endpoint /admin/tools/direct-install correlated with subsequent requests to newly created plugin paths
  • Compare installed plugin manifests against the official Grav package repository to flag sideloaded archives

Monitoring Recommendations

  • Enable verbose logging of the Grav Admin plugin and forward to a centralized log platform
  • Alert on PHP processes spawning shell interpreters or making outbound connections to non-allowlisted hosts
  • Track administrative account usage and flag Direct Install operations performed by accounts that do not normally manage extensions

How to Mitigate CVE-2026-42607

Immediate Actions Required

  • Upgrade Grav to 2.0.0-beta.2 or later, which contains the fix from GHSA-w48r-jppp-rcfw
  • Audit administrator accounts, enforce strong unique passwords, and enable multi-factor authentication where supported
  • Review user/plugins/ and user/themes/ for unexpected files installed since the vulnerability disclosure window

Patch Information

The vulnerability is fixed in Grav 2.0.0-beta.2. The patch is delivered in commit 5a12f9b, which validates ZIP entry names before extraction and hardens related media handling paths. Administrators must still treat plugin sources as trusted code, since the patch addresses path traversal during extraction rather than the implicit trust granted to any installed package.

Workarounds

  • Disable the Direct Install tool in the Admin panel configuration until the upgrade is applied
  • Restrict admin panel access to trusted IP ranges using web server ACLs or a reverse proxy
  • Install plugins only from the official Grav Package Manager and block uploads of arbitrary ZIP archives at the WAF layer
bash
# Disable Direct Install via Grav system configuration
# Edit user/config/plugins/admin.yaml
cat <<'EOF' >> user/config/plugins/admin.yaml
direct_install:
  enabled: false
EOF

# Verify installed Grav 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/TechGrav

  • SeverityCRITICAL

  • CVSS Score9.1

  • EPSS Probability0.31%

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

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-7317: Grav CMS Deserialization RCE Vulnerability

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

  • CVE-2026-42844: Grav CMS Privilege Escalation Vulnerability

  • CVE-2026-42842: Grav CMS Form Plugin XSS 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