GitHub Advisoryadvisory · RubyGems
GHSA-4jvx-93h3-f45h OpenC3 COSMOS allows arbitrary writes to plugins directory via path-traversed config filenames
MEDIUM
Official page ↗
- Aliases
- CVE-2026-42085
- Ecosystem
- RubyGems
- Packages
- openc3
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
- Weaknesses
- CWE-23
- Reviewed
- 2026-04-22
Affected packages
• RubyGems openc3: < 6.10.5 → fixed in 6.10.5
• RubyGems openc3: >= 7.0.0.pre.rc1, < 7.0.0-rc3 → fixed in 7.0.0-rc3
Description
Summary
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.
Details
In function `save_tool_config()` (local_mode.rb) responsible for saving user-supplied tool configuration, the desired saving directory is not sufficiently enforced, instead allowing writes inside entire `OPENC3_LOCAL_MODE_PATH`.
PoC
1. Navigate to any tool that enables “Save Configuration” option in left-hand drop-down menu (here Limits Monitor as an example)
2. Save a new config with path traversal name using “../” sequences to escape desired directory (up to 3 levels high)
3. Observe new files created in /plugins directory by inspecting docker container directly (`openc3-COSMOS-cmd-tlm-api`) or using Bucket Explorer (`plugin_default`)
Impact
Modifying the data of other plugins
Related
Alias · CVE (1)
- CVE-2026-42085 OpenC3 COSMOS provides the functionality needed to send commands to and receive data from one or more embedded systems. vulnerability
Weakness · CWE (1)
- CWE-23 Relative Path Traversal weakness
References
- https://github.com/OpenC3/cosmos/security/advisories/GHSA-4jvx-93h3-f45h web
- https://nvd.nist.gov/vuln/detail/CVE-2026-42085 advisory
- https://github.com/OpenC3/cosmos/commit/9957a9fa460c0c0cf5cdbf6a5931bbdd025246a5 web
- https://github.com/OpenC3/cosmos/commit/e6efccbd148ba0e3361c5891027f2373aa140d42 web
- https://github.com/OpenC3/cosmos package
- https://github.com/OpenC3/cosmos/releases/tag/v6.10.5 web
- https://github.com/OpenC3/cosmos/releases/tag/v7.0.0-rc3 web
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/openc3/CVE-2026-42085.yml web