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

CVE-2026-42842: Grav CMS Form Plugin XSS Vulnerability

CVE-2026-42842 is a stored cross-site scripting flaw in Grav CMS Form plugin that allows editor-level users to inject malicious JavaScript into administrator sessions. This article covers technical details, affected versions, and patches.

Published: May 18, 2026

CVE-2026-42842 Overview

CVE-2026-42842 is a stored Cross-Site Scripting (XSS) vulnerability in the Grav CMS Form plugin affecting versions prior to 9.1.0. The flaw resides in the select field template, where taxonomy tag and category values render through the Twig |raw filter in the admin panel. This bypasses Grav's global autoescape protection. An authenticated editor-level user can inject arbitrary JavaScript that executes in any administrator's browser session when the administrator views or edits a page in the admin panel. The vulnerability is fixed in Grav Form plugin version 9.1.0 [CWE-79].

Critical Impact

A low-privileged editor account can escalate to administrator-level actions by executing JavaScript in an admin's authenticated browser session.

Affected Products

  • Grav CMS Form plugin versions prior to 9.1.0
  • Grav CMS installations with the Form plugin enabled and editor-level users
  • Grav admin panel rendering taxonomy data via the affected select.html.twig template

Discovery Timeline

  • 2026-05-11 - CVE-2026-42842 published to NVD
  • 2026-05-13 - Last updated in NVD database

Technical Details for CVE-2026-42842

Vulnerability Analysis

The Grav CMS Form plugin renders form select fields using the Twig template located at templates/forms/fields/select/select.html.twig. The template applies the |raw filter to placeholder text and option values populated from taxonomy tags and categories. Twig's |raw filter explicitly disables output escaping, overriding Grav's global autoescape configuration that normally neutralizes HTML and JavaScript in rendered content.

An editor-level user with permission to manage taxonomy values can submit payloads containing <script> tags or HTML event handlers. When an administrator subsequently loads a page containing the affected select field in the admin panel, the malicious markup renders directly into the DOM. The script executes with the administrator's session cookies and privileges, enabling account takeover, configuration changes, or installation of malicious plugins.

Root Cause

The root cause is the unnecessary use of the Twig |raw filter on user-controllable text values. Taxonomy tag and category labels do not require HTML rendering, yet the template trusted these strings as safe markup. The fix removes the |raw filter so the global autoescape policy applies and special characters are HTML-encoded before being written to the response.

Attack Vector

Exploitation requires an authenticated editor-level account on the target Grav instance and a separate administrator user who later views or edits an affected page. The attack chain is: an editor injects a JavaScript payload into a taxonomy tag or category value, the payload is stored in Grav's content store, an administrator opens the admin panel page that renders the select field, and the script executes in the administrator's authenticated context.

text
// Patch diff for templates/forms/fields/select/select.html.twig
                     {% endfor %}
                 {% endif %}
                 >
-            {% if field.placeholder %}<option value="" disabled selected>{{ field.placeholder|t|raw }}</option>{% endif %}
+            {% if field.placeholder %}<option value="" disabled selected>{{ field.placeholder|t }}</option>{% endif %}

             {% set options = field.options %}
             {% if field.selectize.create and value %}

Source: Grav Form Plugin Commit 6bffb4c — the patch removes the |raw filter so the placeholder text is escaped by Twig's autoescape.

Detection Methods for CVE-2026-42842

Indicators of Compromise

  • Taxonomy tag or category values in Grav content files containing <script>, onerror=, onload=, or javascript: strings.
  • Unexpected admin-panel HTTP requests originating from administrator sessions immediately after viewing pages with custom taxonomy data.
  • New administrator accounts, plugin installations, or configuration changes performed shortly after an editor account modifies taxonomy values.

Detection Strategies

  • Audit Grav content storage (user/pages/**/*.md and frontmatter taxonomy blocks) for HTML or JavaScript syntax inside taxonomy.tag and taxonomy.category fields.
  • Review admin panel access logs for editor accounts modifying taxonomy values, then correlate with subsequent administrator sessions loading the same pages.
  • Deploy a Content Security Policy (CSP) in report-only mode to surface inline script execution attempts in the admin panel.

Monitoring Recommendations

  • Monitor write operations to Grav page frontmatter and flag changes that introduce HTML special characters in taxonomy fields.
  • Alert on privilege changes, new admin user creation, and plugin installation events that follow editor-driven taxonomy edits.
  • Track outbound requests from admin browser sessions to non-allowlisted domains, which may indicate exfiltration via injected script.

How to Mitigate CVE-2026-42842

Immediate Actions Required

  • Upgrade the Grav Form plugin to version 9.1.0 or later on all Grav CMS instances.
  • Audit all editor-level accounts and revoke access for users that do not require content authoring privileges.
  • Inspect existing taxonomy tag and category values across all pages and remove any entries containing HTML or script syntax.

Patch Information

The vulnerability is fixed in Grav Form plugin version 9.1.0. The patch, tracked as GHSA-c2q3-p4jr-c55f, removes the |raw Twig filter from the select field template so the global autoescape policy properly encodes output. Apply the update through Grav's package manager or by replacing the plugin files with the released version.

Workarounds

  • If immediate patching is not possible, manually edit templates/forms/fields/select/select.html.twig to remove the |raw filter from the placeholder rendering line.
  • Restrict taxonomy editing permissions so only administrator-level users can modify tag and category values until the patch is applied.
  • Enforce a strict Content Security Policy on the admin panel that disallows inline script execution.
bash
# Update Grav Form plugin via the Grav package manager (GPM)
bin/gpm update form

# Verify the installed plugin version is 9.1.0 or later
bin/gpm info form | grep -i version

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

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechGrav

  • SeverityMEDIUM

  • CVSS Score5.4

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitHub Plugin Commit

  • GitHub Security Advisory GHSA-c2q3-p4jr-c55f
  • Related CVEs
  • CVE-2026-44737: Grav Admin Plugin XSS Vulnerability

  • CVE-2026-42841: Getgrav Grav XSS Vulnerability

  • CVE-2025-66309: Grav-plugin-admin XSS Vulnerability

  • CVE-2025-66310: Grav Admin Plugin Stored 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