CVE-2026-42085: Openc3 OpenC3 COSMOS Allows Arbitrary Writes Vulnerability

MODERATE
Advisory Identifier: GHSA-4jvx-93h3-f45h
CVSS 4.3
CWE-23
Published
Advisory Summary

CVE-2026-42085 is a MODERATE (CVSS 4.3) openc3 cosmos allows arbitrary writes vulnerability (CWE-23: Relative Path Traversal) affecting Openc3 libraries in the RubyGems ecosystem. The issue involves openc3 cosmos allows arbitrary writes to plugins directory via path-traversed config filenames. Remediation is available by upgrading affected packages to version 6.10.5, 7.0.0-rc3.

CVE-2026-42085 at a Glance

CVE Identifier CVE-2026-42085
GHSA Identifier GHSA-4jvx-93h3-f45h
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-23: Relative Path Traversal
Affected Product Openc3
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-42085

To remediate this vulnerability, upgrade all affected Openc3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

openc3 fixed: 6.10.5
Upgrade openc3 to 6.10.5
openc3 fixed: 7.0.0-rc3
Upgrade openc3 to 7.0.0-rc3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for openc3

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-42085, inspect your project dependencies for Openc3:

inspect dependencies for openc3

Analyze the terminal output to locate any version of Openc3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.10.5), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-23: Relative Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. In Openc3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://github.com/OpenC3/cosmos/blob/397abec0d57972881a2e8dc10902d0dce9c27f42/openc3/lib/openc3/utilities/local_mode.rb#L452)) 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`) <img width="811" height="584" alt="image" src="https://github.com/user-attachments/assets/015a59b4-8b18-4801-aef0-df4831d5c1c3" /> <img width="720" height="664" alt="image" src="https://github.com/user-attachments/assets/8ca4a5b7-ee45-4c3b-99f6-f41f974a74a7" /> ### Impact Modifying the data of other plugins

CVE-2026-42085 Affected Openc3 Versions

2 component(s)
Fixed Versions:
6.10.57.0.0-rc3
Product / Package Ecosystem Affected Versions Fixed Version
openc3
RubyGems
< 6.10.5
6.10.5
openc3
RubyGems
≥ 7.0.0.pre.rc1
< 7.0.0-rc3
7.0.0-rc3

References

Frequently Asked Questions

What is CVE-2026-42085?
CVE-2026-42085 is a security vulnerability in Openc3 involving OpenC3 COSMOS allows arbitrary writes to plugins directory via path-traversed config filenames under CWE-23: Relative Path Traversal.
Which Openc3 versions are affected?
Affected versions include releases prior to 6.10.5, 7.0.0-rc3 across affected packages: openc3.
What version fixes CVE-2026-42085?
Upgrading to 6.10.5, 7.0.0-rc3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is openc3 affected?
Yes, openc3 is affected in releases prior to 6.10.5, 7.0.0-rc3. Upgrade your dependency to 6.10.5, 7.0.0-rc3 or later.
What is the CVSS score of CVE-2026-42085?
CVE-2026-42085 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-42085?
CVE-2026-42085 is classified under CWE-23: Relative Path Traversal (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.).
How can I check RubyGems dependencies for CVE-2026-42085?
Run the dependency tree command: 'inspect dependencies for openc3'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4jvx-93h3-f45h",
  "modified" : "2026-05-29T21:45:12Z",
  "published" : "2026-04-22T22:22:02Z",
  "aliases" : [ "CVE-2026-42085" ],
  "summary" : "OpenC3 COSMOS allows arbitrary writes to plugins directory via path-traversed config filenames",
  "details" : "### Summary\nOpenC3 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.\n\n### Details\nIn function `save_tool_config()` ([local_mode.rb](https://github.com/OpenC3/cosmos/blob/397abec0d57972881a2e8dc10902d0dce9c27f42/openc3/lib/openc3/utilities/local_mode.rb#L452))  responsible for saving user-supplied tool configuration, the desired saving directory is not sufficiently enforced, instead allowing writes inside entire `OPENC3_LOCAL_MODE_PATH`.\n\n### PoC\n1.\tNavigate to any tool that enables “Save Configuration” option in left-hand drop-down menu (here Limits Monitor as an example)\n2.\tSave a new config with path traversal name using “../” sequences to escape desired directory (up to 3 levels high)\n3.\tObserve new files created in /plugins directory by inspecting docker container directly (`openc3-COSMOS-cmd-tlm-api`) or using Bucket Explorer (`plugin_default`)\n\n<img width=\"811\" height=\"584\" alt=\"image\" src=\"https://github.com/user-attachments/assets/015a59b4-8b18-4801-aef0-df4831d5c1c3\" />\n<img width=\"720\" height=\"664\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8ca4a5b7-ee45-4c3b-99f6-f41f974a74a7\" />\n\n### Impact\nModifying the data of other plugins",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "openc3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.10.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "openc3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0.pre.rc1"
      }, {
        "fixed" : "7.0.0-rc3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/OpenC3/cosmos/security/advisories/GHSA-4jvx-93h3-f45h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42085"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenC3/cosmos/commit/9957a9fa460c0c0cf5cdbf6a5931bbdd025246a5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenC3/cosmos/commit/e6efccbd148ba0e3361c5891027f2373aa140d42"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/OpenC3/cosmos"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenC3/cosmos/releases/tag/v6.10.5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenC3/cosmos/releases/tag/v7.0.0-rc3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/openc3/CVE-2026-42085.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-23" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-22T22:22:02Z",
    "nvd_published_at" : "2026-05-04T18:16:30Z"
  }
}