Security Vulnerability Report
中文
CVE-2026-42086 CVSS 4.6 MEDIUM

CVE-2026-42086

Published: 2026-05-04 18:16:31
Last Modified: 2026-05-08 19:54:40

Description

OpenC3 COSMOS provides the functionality needed to send commands to and receive data from one or more embedded systems. Prior to version 7.0.0, the Command Sender UI uses an unsafe eval() function on array-like command parameters, which allows a user-supplied payload to execute in the browser when sending a command. This creates a self-XSS risk because an attacker can trigger their own script execution in the victim’s session, if allowed to influence the array parameter input, for example via phishing. If successful, an attacker may read or modify data in the authenticated browser context, including session tokens in local storage. This issue has been patched in version 7.0.0.

CVSS Details

CVSS Score
4.6
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/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
cpe:2.3:a:openc3:cosmos:7.0.0:rc3:*:*:open_source:*:*:* - VULNERABLE
OpenC3 COSMOS < 7.0.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC for CVE-2026-42086: OpenC3 COSMOS Self-XSS via eval() // The target is the Command Sender UI array parameter input. // Payload: An array definition that executes arbitrary JS (e.g., alert(document.domain)) // Malicious payload to be injected into the array parameter field const payload = `["test", (function(){alert(document.cookie);})()]`; // Simulating the vulnerable code in the backend/frontend processing // The application takes the user input and passes it to eval() function vulnerableCommandSender(userInput) { console.log("Sending command..."); // VULNERABILITY: Unsafe use of eval() on user input const params = eval(userInput); console.log("Parameters processed:", params); } // Trigger the vulnerability vulnerableCommandSender(payload);

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42086", "sourceIdentifier": "[email protected]", "published": "2026-05-04T18:16:30.667", "lastModified": "2026-05-08T19:54:39.990", "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. Prior to version 7.0.0, the Command Sender UI uses an unsafe eval() function on array-like command parameters, which allows a user-supplied payload to execute in the browser when sending a command. This creates a self-XSS risk because an attacker can trigger their own script execution in the victim’s session, if allowed to influence the array parameter input, for example via phishing. If successful, an attacker may read or modify data in the authenticated browser context, including session tokens in local storage. This issue has been patched in version 7.0.0."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N", "baseScore": 4.6, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.1, "impactScore": 2.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:openc3:cosmos:*:*:*:*:open_source:*:*:*", "versionEndExcluding": "7.0.0", "matchCriteriaId": "286B983F-D46F-46E4-8EEA-FFA6506A005B"}, {"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"}, {"vulnerable": true, "criteria": "cpe:2.3:a:openc3:cosmos:7.0.0:rc3:*:*:open_source:*:*:*", "matchCriteriaId": "3826B062-66B3-42BB-80C3-A1CD76AD038A"}]}]}], "references": [{"url": "https://github.com/OpenC3/cosmos/security/advisories/GHSA-ffq5-qpvf-xq7x", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/OpenC3/cosmos/security/advisories/GHSA-ffq5-qpvf-xq7x", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}