CVE-2026-42085: OpenC3 COSMOS allows arbitrary writes to plugins directory via path-traversed config filenames
Summary OpenC3 COSMOS contains a design flaw in the savetoolconfig() 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.
Published Apr 22, 2026 · Updated May 29, 2026
Affected packages
openc3
- Ecosystem
- RubyGems
- Affected
- < 6.10.5
- Fixed in
- 6.10.5
- Check
bundle info openc3
openc3
- Ecosystem
- RubyGems
- Affected
- >= 7.0.0.pre.rc1, < 7.0.0-rc3
- Fixed in
- 7.0.0-rc3
- Check
bundle info openc3
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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
- Navigate to any tool that enables “Save Configuration” option in left-hand drop-down menu (here Limits Monitor as an example)
- Save a new config with path traversal name using “../” sequences to escape desired directory (up to 3 levels high)
- 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
Credited to ctrlsill.
References
- https://github.com/OpenC3/cosmos/security/advisories/GHSA-4jvx-93h3-f45h
- https://github.com/OpenC3/cosmos/commit/9957a9fa460c0c0cf5cdbf6a5931bbdd025246a5
- https://github.com/OpenC3/cosmos/commit/e6efccbd148ba0e3361c5891027f2373aa140d42
- https://github.com/OpenC3/cosmos/releases/tag/v6.10.5
- https://github.com/OpenC3/cosmos/releases/tag/v7.0.0-rc3
- https://nvd.nist.gov/vuln/detail/CVE-2026-42085
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/openc3/CVE-2026-42085.yml
- https://github.com/advisories/GHSA-4jvx-93h3-f45h
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More RubyGems vulnerabilities
All RubyGems entriesCVE-2026-77601
OpenC3 COSMOS: Authenticated OS command injection via the `pypi_url` setting
high8.8Sep 23, 2026CVE-2026-77602
OpenC3 COSMOS: Authenticated remote code execution via the user-writable config overlay (table definitions, cmd/tlm definitions, and script suites)
critical9.9Sep 23, 2026CVE-2026-42087
OpenC3 COSMOS has SQL Injection in QuestDB Time-Series Database
critical9.6Apr 23, 2026GHSA-2wvh-87g2-89hr
OpenC3 COSMOS: Permissions Bypass Provides User Access to Unassigned Administrative Actions via Script Runner Tool
critical9.6Apr 23, 2026CVE-2026-42084
OpenC3 COSMOS: Hijacked session token can be used to reset password for persistence
high8.1Apr 22, 2026CVE-2026-42086
OpenC3 COSMOS is Vulnerable to Self-XSS Through the Command Sender
medium4.6Apr 22, 2026
