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 package | Versions | Reported by |
|---|---|---|
| OpenC3 cosmos | >= 6.7.0, < 7.0.0-rc3, from 6.7.0 before 7.0.0, 7.0.0 | CVE List, NVD |
| openc3 (RubyGems) | from 6.7.0 before 7.0.0-rc3 | GitHub Advisory Database |
| openc3 (PyPI) | from 6.7.0 before 7.0.0 | PyPA Advisory Database |
All scores
| GitHub_M | 9.6critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N |
| GitHub | 9.6critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N |
| PyPA Advisory Database | 9.6critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N |
Classification
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.
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.
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:
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:
Figure 4: The request and response after sending the SQL injection payload This payload can be modified to executes SQL commands in the TSDB.
imageFigure 5: SQL injection used to execute arbitrary SQL command The user can then delete all the historical data in the database:
imageFigure 6: Example payload dropping the tables
Steps to Reproduce
- Capture a JSON-RPC request to the
get_tlm_valuesendpoint. - Add the
start_timekey to the request body and place the following in the value:
‘ OR 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
| https://github.com/OpenC3/cosmos/security/advisories/GHSA-v529-vhwc-wfc5 | evidence, exploit, vendor-advisory, web | |
| https://github.com/OpenC3/cosmos/commit/9ba60c09c8836a37a2e4ea67ab35fe403e041415 | fix, patch, web | |
| https://github.com/OpenC3/cosmos/releases/tag/v7.0.0-rc3 | advisory, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-42087 | advisory | |
| https://github.com/OpenC3/cosmos | package | |
| https://github.com/rubysec/ruby-advisory-db/blob/master/gems/openc3/CVE-2026-42087.yml | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-42087 changed 2026-05-05 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-v529-vhwc-wfc5 changed 2026-07-13 | CC-BY-4.0 |
| NVD | CVE-2026-42087 changed 2026-10-26 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2244 changed 2026-07-13 | CC-BY-4.0 |