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

CVE-2026-42087: OpenC3 COSMOS SQL Injection Vulnerability

CVE-2026-42087 is a SQL injection vulnerability in OpenC3 COSMOS affecting versions 6.7.0 to 7.0.0-rc3. Attackers can execute arbitrary SQL commands and delete data. This article covers technical details, impact, and patches.

Published: May 7, 2026

CVE-2026-42087 Overview

CVE-2026-42087 is a SQL injection vulnerability in OpenC3 COSMOS, an open-source platform used to send commands to and receive telemetry from embedded systems. The flaw resides in the Time-Series Database (TSDB) component, specifically the tsdb_lookup function in cvt_model.rb. The function concatenates user-supplied input directly into a SQL query without sanitization, allowing an authenticated attacker to break out of the intended statement and execute arbitrary SQL commands. Affected releases span from version 6.7.0 up to but not including 7.0.0-rc3. The maintainers patched the issue in version 7.0.0-rc3 by introducing parameterized queries.

Critical Impact

An authenticated attacker can execute arbitrary SQL against the COSMOS TSDB, including deleting telemetry data and tampering with operational records that drive embedded system command-and-control workflows.

Affected Products

  • OpenC3 COSMOS versions 6.7.0 through 6.x
  • OpenC3 COSMOS pre-release versions before 7.0.0-rc3
  • Deployments using the COSMOS Time-Series Database (TSDB) component

Discovery Timeline

  • 2026-05-04 - CVE-2026-42087 published to NVD
  • 2026-05-05 - Last updated in NVD database

Technical Details for CVE-2026-42087

Vulnerability Analysis

The vulnerability is a classic SQL injection [CWE-89] in the COSMOS TSDB lookup path. The tsdb_lookup function builds a query by interpolating the start_time and end_time parameters directly into a SQL string. Because these values flow into the WHERE T0.PACKET_TIMESECONDS predicate without escaping or type validation, an attacker who controls these parameters can terminate the literal and append arbitrary SQL syntax. The COSMOS TSDB stores telemetry and command history for embedded systems, so successful injection enables data destruction, modification of historical telemetry, and exposure of sensitive operational data.

Root Cause

The root cause is unsafe string interpolation in both the Ruby implementation (openc3/lib/openc3/models/cvt_model.rb) and the Python implementation (openc3/python/openc3/models/cvt_model.py). Each implementation built the time-range filter using inline expressions such as "WHERE T0.PACKET_TIMESECONDS < '#{start_time}'" rather than passing values as bound parameters. The application trusted caller-supplied time values as safe SQL fragments.

Attack Vector

Exploitation requires network access to the COSMOS API and low-privilege authentication. An attacker submits crafted start_time or end_time values that close the SQL string literal and append additional statements such as DELETE, UPDATE, or subqueries. Because the scope is changed (CVSS S:C), the injection can affect TSDB content beyond the immediate query context, impacting other users and integrations that consume the same data store.

ruby
# Patch excerpt: openc3/lib/openc3/models/cvt_model.rb
# Replaces inline interpolation with parameterized queries
           query += "ASOF JOIN #{table_name} as T#{index} "
         end
       end
+      query_params = []
       if start_time && !end_time
-        query += "WHERE T0.PACKET_TIMESECONDS < '#{start_time}' LIMIT -1"
+        query += "WHERE T0.PACKET_TIMESECONDS < $1 LIMIT -1"
+        query_params << start_time
       elsif start_time && end_time
-        query += "WHERE T0.PACKET_TIMESECONDS >= '#{start_time}' AND T0.PACKET_TIMESECONDS < '#{end_time}'"
+        query += "WHERE T0.PACKET_TIMESECONDS >= $1 AND T0.PACKET_TIMESECONDS < $2"
+        query_params << start_time
+        query_params << end_time
       end

Source: GitHub Commit 9ba60c0

python
# Patch excerpt: openc3/python/openc3/models/cvt_model.py
             else:
                 query += f"ASOF JOIN {table_name} as T{index} "
 
+        query_params = []
         if start_time and not end_time:
-            query += f"WHERE T0.PACKET_TIMESECONDS < '{start_time}' LIMIT -1"
+            query += "WHERE T0.PACKET_TIMESECONDS < %s LIMIT -1"
+            query_params.append(start_time)
         elif start_time and end_time:
-            query += f"WHERE T0.PACKET_TIMESECONDS >= '{start_time}' AND T0.PACKET_TIMESECONDS < '{end_time}'"
+            query += "WHERE T0.PACKET_TIMESECONDS >= %s AND T0.PACKET_TIMESECONDS < %s"
+            query_params.append(start_time)
+            query_params.append(end_time)

Source: GitHub Commit 9ba60c0

Detection Methods for CVE-2026-42087

Indicators of Compromise

  • Authenticated COSMOS API requests containing single quotes, semicolons, SQL keywords (UNION, DELETE, DROP, --) in start_time or end_time parameters.
  • Unexpected TSDB row deletions or schema-altering operations in COSMOS database audit logs.
  • TSDB query errors referencing malformed WHERE T0.PACKET_TIMESECONDS clauses originating from the tsdb_lookup code path.

Detection Strategies

  • Inspect web and API gateway logs for non-numeric or quoted values supplied to time-range parameters in COSMOS TSDB endpoints.
  • Enable database query logging on the TSDB backend and alert on statements that contain stacked queries or unexpected DELETE/UPDATE verbs.
  • Compare current TSDB record counts and checksums against trusted backups to identify unexplained data loss.

Monitoring Recommendations

  • Forward COSMOS application logs and TSDB audit logs to a centralized analytics platform for anomaly detection.
  • Monitor for spikes in failed TSDB queries, which often precede successful injection attempts during attacker probing.
  • Track authenticated user sessions issuing tsdb_lookup calls outside normal operational windows or from unfamiliar source addresses.

How to Mitigate CVE-2026-42087

Immediate Actions Required

  • Upgrade all OpenC3 COSMOS deployments to version 7.0.0-rc3 or later, which replaces inline interpolation with parameterized queries.
  • Restrict network access to the COSMOS management interface and API to trusted operator networks only.
  • Rotate credentials for any COSMOS accounts that could have been used to access the TSDB during the exposure window.
  • Validate the integrity of TSDB telemetry against offline backups to confirm no records were deleted or altered.

Patch Information

The maintainers fixed the vulnerability in OpenC3 COSMOS v7.0.0-rc3. The patch is detailed in GitHub Security Advisory GHSA-v529-vhwc-wfc5 and implemented in commit 9ba60c0. Both Ruby and Python implementations of cvt_model now use bound parameters ($1/$2 and %s).

Workarounds

  • If immediate upgrade is not possible, disable or block external access to the TSDB lookup endpoints until the patch can be applied.
  • Apply strict input validation at a reverse proxy or WAF, rejecting start_time and end_time values that do not match a numeric or ISO-8601 timestamp pattern.
  • Limit COSMOS user accounts to the minimum privilege set, and revoke TSDB write access for any role that does not require it.
bash
# Example: enforce numeric-only time parameters at an Nginx reverse proxy
location /cosmos-api/tsdb/ {
    if ($arg_start_time !~ "^[0-9.]+$") { return 400; }
    if ($arg_end_time   !~ "^[0-9.]*$") { return 400; }
    proxy_pass http://cosmos_backend;
}

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

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechOpenc3

  • SeverityCRITICAL

  • CVSS Score9.6

  • EPSS Probability0.02%

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

  • GitHub Release v7.0.0-rc3

  • GitHub Security Advisory GHSA-v529-vhwc-wfc5
  • Related CVEs
  • CVE-2026-42084: OpenC3 COSMOS Auth Bypass Vulnerability

  • CVE-2026-42086: OpenC3 COSMOS Command Sender XSS Flaw

  • CVE-2026-42085: OpenC3 COSMOS 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