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-2026-31891

CVE-2026-31891: Cockpit CMS SQL Injection Vulnerability

CVE-2026-31891 is a SQL injection flaw in Cockpit CMS that allows attackers with read-only API access to extract unauthorized data from the SQLite database. This article covers technical details, affected versions, and mitigation.

Published: March 20, 2026

CVE-2026-31891 Overview

CVE-2026-31891 is a SQL Injection vulnerability affecting Cockpit CMS, a headless content management system. The vulnerability exists in the MongoLite Aggregation Optimizer component, specifically within the toJsonExtractRaw() method in lib/MongoLite/Aggregation/Optimizer.php. Any Cockpit CMS instance running version 2.13.4 or earlier with API access enabled is potentially affected by this security flaw.

The vulnerability allows attackers to inject arbitrary SQL via unsanitized field names in aggregation queries. Notably, exploitation requires only a valid read-only API key (the lowest privilege level) — no admin access is required. This makes the attack surface particularly concerning for deployments where the /api/content/aggregate/{model} endpoint is publicly accessible or reachable by untrusted users.

Critical Impact

Attackers can bypass the _state=1 published-content filter to access unpublished or restricted content and extract unauthorized data from the underlying SQLite content database.

Affected Products

  • Cockpit CMS version 2.13.4 and earlier
  • Deployments with publicly accessible /api/content/aggregate/{model} endpoint
  • Instances where untrusted users have access to read-only API keys

Discovery Timeline

  • 2026-03-18 - CVE CVE-2026-31891 published to NVD
  • 2026-03-18 - Last updated in NVD database

Technical Details for CVE-2026-31891

Vulnerability Analysis

This SQL Injection vulnerability (CWE-89) stems from improper input sanitization in the MongoLite Aggregation Optimizer. The attack requires network access with low privileges (a read-only API key), making it accessible to a wide range of potential attackers. The vulnerability has a changed scope, meaning successful exploitation can affect resources beyond the vulnerable component itself, specifically allowing unauthorized access to content stored in the SQLite database.

The core issue is that field names passed to aggregation queries are not properly sanitized before being used in SQL operations. While version 2.13.3 introduced field-name sanitization for the toJsonPath() method, the toJsonExtractRaw() method in the same file was left vulnerable, creating an injection vector that attackers could exploit.

Root Cause

The root cause of CVE-2026-31891 is insufficient input validation in the toJsonExtractRaw() method within lib/MongoLite/Aggregation/Optimizer.php. When processing aggregation queries, field names provided by users are directly incorporated into SQL statements without proper sanitization or parameterization. This allows attackers to craft malicious field names containing SQL syntax that gets executed against the underlying SQLite database.

The fix introduced in version 2.13.5 applies the same field-name sanitization that was implemented in version 2.13.3 for toJsonPath() to the toJsonExtractRaw() method, ensuring consistent protection against SQL injection across both methods.

Attack Vector

The attack is conducted over the network by sending specially crafted aggregation queries to the /api/content/aggregate/{model} API endpoint. An attacker in possession of even a read-only API key can exploit this vulnerability by including malicious SQL fragments within field names in aggregation requests.

The injection allows attackers to:

  • Bypass content state filters (e.g., _state=1) designed to restrict access to published content only
  • Access unpublished, draft, or otherwise restricted content entries
  • Extract sensitive data from the SQLite content database

The vulnerability mechanism involves unsanitized field names being passed through the toJsonExtractRaw() method, which constructs SQL queries using these field names without proper escaping. For technical details and proof-of-concept information, refer to the GitHub Security Advisory GHSA-7x5c-vfhj-9628.

Detection Methods for CVE-2026-31891

Indicators of Compromise

  • Unusual or malformed requests to the /api/content/aggregate/{model} endpoint containing SQL syntax in field names
  • API access logs showing aggregation queries with special characters like single quotes, semicolons, or SQL keywords
  • Unexpected access to unpublished content or content states that should be filtered
  • Database query logs showing injected SQL statements within JSON extraction operations

Detection Strategies

  • Monitor API logs for requests to aggregation endpoints containing suspicious characters or SQL keywords in field name parameters
  • Implement Web Application Firewall (WAF) rules to detect SQL injection patterns in API request bodies
  • Review access logs for read-only API key usage patterns that indicate data enumeration or extraction attempts
  • Deploy runtime application self-protection (RASP) solutions to detect SQL injection attempts at the application layer

Monitoring Recommendations

  • Enable detailed logging for all API requests to content aggregation endpoints
  • Set up alerts for failed or anomalous aggregation queries that may indicate exploitation attempts
  • Monitor for unusual data access patterns, particularly access to unpublished or draft content
  • Implement rate limiting on aggregation endpoints to slow down potential data extraction attacks
  • Review API key usage and audit which keys have access to aggregation functionality

How to Mitigate CVE-2026-31891

Immediate Actions Required

  • Upgrade Cockpit CMS to version 2.13.5 or later immediately
  • Audit API keys and revoke any that are no longer needed or may have been compromised
  • Review access logs for the /api/content/aggregate/{model} endpoint for signs of exploitation
  • Temporarily restrict access to aggregation endpoints if immediate patching is not possible
  • Verify that no unauthorized data was accessed by reviewing content access patterns

Patch Information

The vulnerability has been patched in Cockpit CMS version 2.13.5. The fix applies field-name sanitization to the toJsonExtractRaw() method in lib/MongoLite/Aggregation/Optimizer.php, matching the sanitization introduced in version 2.13.3 for toJsonPath(). This closes the injection vector in the Aggregation Optimizer.

For detailed patch information, see the GitHub Release 2.13.5 and the GitHub Security Advisory GHSA-7x5c-vfhj-9628.

Workarounds

  • Disable public access to the /api/content/aggregate/{model} endpoint until patching is complete
  • Implement a reverse proxy or WAF rule to block requests containing SQL injection patterns in aggregation query parameters
  • Restrict API key distribution and revoke keys from untrusted users
  • Apply network-level access controls to limit who can reach the aggregation API endpoints
bash
# Example: Restrict access to aggregation endpoint via nginx
location /api/content/aggregate/ {
    # Allow only trusted IP ranges
    allow 10.0.0.0/8;
    allow 192.168.1.0/24;
    deny all;
    
    # Proxy to Cockpit CMS backend
    proxy_pass http://cockpit_backend;
}

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

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechCockpit Cms

  • SeverityHIGH

  • CVSS Score7.7

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-89
  • Technical References
  • GitHub Release 2.13.5

  • GitHub Security Advisory GHSA-7x5c-vfhj-9628
  • Latest CVEs
  • CVE-2025-70797: LimeSurvey XSS Vulnerability

  • CVE-2025-30650: Juniper Junos OS Auth Bypass Vulnerability

  • CVE-2026-35471: Goshs Path Traversal Vulnerability

  • CVE-2026-35393: Goshs Path Traversal 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