CVE-2026-42087
JSON

9.6critical

OpenC3 COSMOS: SQL Injection in QuestDB Time-Series Data Base

Severity
9.6critical CVSS:3.1 by GitHub_M
Exploit likelihood
0.34% (higher than 28% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-v529-vhwc-wfc5PYSEC-2026-2244

Description

OpenC3 COSMOS provides the functionality needed to send commands to and receive data from one or more embedded systems. From version 6.7.0 to before version 7.0.0-rc3, a SQL injection vulnerability exists in the Time-Series Database (TSDB) component of COSMOS. The tsdb_lookup function in the cvt_model.rb file directly places user-supplied input into a SQL query without sanitizing the input. As a result, a user can break out of the initial SQL statement and execute arbitrary SQL commands, including deleting data. This issue has been patched in version 7.0.0-rc3.

Affected

Product or packageVersionsReported by
OpenC3 cosmos>= 6.7.0, < 7.0.0-rc3, from 6.7.0 before 7.0.0, 7.0.0CVE List, NVD
openc3 (RubyGems)from 6.7.0 before 7.0.0-rc3GitHub Advisory Database
openc3 (PyPI)from 6.7.0 before 7.0.0PyPA Advisory Database

All scores

GitHub_M9.6critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
GitHub9.6critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
PyPA Advisory Database9.6critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N

Classification

CWE-89

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

OpenC3 COSMOS provides the functionality needed to send commands to and receive data from one or more embedded systems. From version 6.7.0 to before version 7.0.0-rc3, a SQL injection vulnerability exists in the Time-Series Database (TSDB) component of COSMOS. The tsdb_lookup function in the cvt_model.rb file directly places user-supplied input into a SQL query without sanitizing the input. As a result, a user can break out of the initial SQL statement and execute arbitrary SQL commands, including deleting data. This issue has been patched in version 7.0.0-rc3.

GitHub Advisory Database

Vulnerability Type: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') Attack type: Authenticated remote Impact: Telemetry data disclosure and deletion Affected components: openc3-tsdb (QuestDB)

A SQL injection vulnerability exists in the Time-Series Database (TSDB) component of COSMOS. The tsdb_lookup function in the cvt_model.rb file directly places user-supplied input into a SQL query without sanitizing the input. As a result, a user can break out of the initial SQL statement and execute arbitrary SQL commands, including deleting data.

image

Figure 1: Source code vulnerable to SQL injection Additionally, the get_tlm_values RPC endpoint only requires “tlm” permissions, allowing any user with the Admin, Operator, Viewer, or Runner roles to send a request to the TSDB. This permission is defined in roles-permissions.md to allow for the user to view telemetry data, but this vulnerability also allows them to delete data and tables.

image

Figure 2: Source code showing the required permissions for the get_tlm_values endpoint Sending a normal request to the endpoint brings back a single array of values for the parameter:

image

Figure 3: A normal request to the get_tlm_values endpoint However, sending a specially crafted request within the start_time variable brings back all the data in the database:

image

Figure 4: The request and response after sending the SQL injection payload This payload can be modified to executes SQL commands in the TSDB.

image

Figure 5: SQL injection used to execute arbitrary SQL command The user can then delete all the historical data in the database:

image

Figure 6: Example payload dropping the tables

Steps to Reproduce
  1. Capture a JSON-RPC request to the get_tlm_values endpoint.
  2. Add the start_time key to the request body and place the following in the value:
‘ OR 1=1 --
  1. Retrieve all database data.
Recommendations

• Sanitize all user-supplied input before executing it • Use prepared statements with parameterized queries when executing SQL statements

NVD (es)

OpenC3 COSMOS proporciona la funcionalidad necesaria para enviar comandos a y recibir datos de uno o más sistemas embebidos. Desde la versión 6.7.0 hasta antes de la versión 7.0.0-rc3, existe una vulnerabilidad de inyección SQL en el componente de Base de Datos de Series Temporales (TSDB) de COSMOS. La función tsdb_lookup en el archivo cvt_model.rb inserta directamente la entrada proporcionada por el usuario en una consulta SQL sin sanear la entrada. Como resultado, un usuario puede escapar de la sentencia SQL inicial y ejecutar comandos SQL arbitrarios, incluyendo la eliminación de datos. Este problema ha sido parcheado en la versión 7.0.0-rc3.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-42087 changed 2026-05-05CVE Terms of Use
GitHub Advisory DatabaseGHSA-v529-vhwc-wfc5 changed 2026-07-13CC-BY-4.0
NVDCVE-2026-42087 changed 2026-10-26Public domain
PyPA Advisory DatabasePYSEC-2026-2244 changed 2026-07-13CC-BY-4.0