CVE-2026-77601: OpenC3 COSMOS Authenticated OS Command Injection Vulnerability

HIGH
Advisory Identifier: GHSA-vp3w-52v9-q57f
CVSS 8.8
CWE-78
Published
Advisory Summary

CVE-2026-77601 is a HIGH (CVSS 8.8) authenticated os command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting OpenC3 COSMOS libraries in the RubyGems ecosystem. The issue involves authenticated os command injection via the `pypi_url` setting. Remediation is available by upgrading affected packages to version 7.3.0.

CVE-2026-77601 at a Glance

CVE Identifier CVE-2026-77601
GHSA Identifier GHSA-vp3w-52v9-q57f
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product OpenC3 COSMOS
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 8.8

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:H/I:H/A:H).

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 High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-77601

To remediate this vulnerability, upgrade all affected OpenC3 COSMOS 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: 7.3.0
Upgrade openc3 to 7.3.0
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-77601, inspect your project dependencies for OpenC3 COSMOS:

inspect dependencies for openc3

Analyze the terminal output to locate any version of OpenC3 COSMOS in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.3.0), 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In OpenC3 COSMOS, 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 An authenticated user can execute arbitrary operating system commands on the `openc3-cosmos-cmd-tlm-api` service. The `pypi_url` setting is interpolated, unescaped, into a command line that is run through a shell backtick when a plugin is installed. Shell metacharacters in the setting value are executed by `/bin/sh`. ## Details The `pypi_url` value is written through the `set_setting` API method, reachable over the JSON-RPC endpoint `POST /openc3-api/api`. In the open-source edition, `authorize` (`openc3/lib/openc3/utilities/authorization.rb`) verifies only that the session token is valid and returns the anonymous user; the `permission:` argument is not enforced, so any authenticated user can write the setting and install a plugin. In the Enterprise edition these actions require the admin role. During plugin install, `PluginModel.install_phase2` reads the setting and builds the argument string, then runs it through a backtick (`openc3/lib/openc3/models/plugin_model.rb:288`): ```ruby pypi_url = get_setting('pypi_url', scope: scope) # attacker-controlled, no validation pypi_url += '/simple' if pypi_url pip_args = "-i #{pypi_url} -r #{requirements_path}" output = `/openc3/bin/pipinstall #{pip_args}` # Ruby backtick -> /bin/sh -c ``` `get_setting` appends `/simple` to the stored value, and a trailing `#` comments out that suffix and the remainder of the argument string. The python install branch runs whenever the installed plugin contains a `requirements.txt` or `pyproject.toml`, which the actor controls because they supply the plugin gem. The sibling installer `openc3/lib/openc3/models/python_package_model.rb:95` performs the same `pipinstall` invocation using an argv array through `ProcessManager.spawn`, which does not involve a shell and is not injectable. `plugin_model.rb:288` is the single site that uses a backtick. ## PoC Confirmed end-to-end over HTTP against a booted `openc3-cosmos-cmd-tlm-api` (puma) with Redis and bucket storage. Every request is authenticated. 1. Obtain a session token: ``` POST /openc3-api/auth/verify {"password":"<password>"} ``` 2. Write the setting (JSON-RPC): ``` POST /openc3-api/api {"jsonrpc":"2.0","method":"set_setting", "params":["pypi_url","https://pypi.org ; id > /tmp/A1_PWNED 2>&1 ; #"], "keyword_params":{"scope":"DEFAULT"},"id":1} ``` 3. Upload a plugin gem that contains a `requirements.txt`: ``` POST /openc3-api/plugins (multipart: plugin=@malicious.gem, scope=DEFAULT) ``` 4. Install it: ``` POST /openc3-api/plugins/install/<id> (plugin_hash from step 3, scope=DEFAULT) ``` The injected command executed inside the install process. Contents of the marker file written by the payload: ``` uid=1001(openc3) gid=1001(openc3) groups=1001(openc3) ``` ## Impact Arbitrary OS command execution as the `openc3` user (uid 1001) inside the cmd-tlm-api container. That process holds the Redis/Valkey password and the bucket (S3) credentials and operates across every scope, so command execution there exposes stored telemetry, commanding, and credentials, and allows tampering with any scope. In the Enterprise edition the prerequisite is the admin role; the admin already has plugin-driven code execution by design, so the practical effect there is that a configuration value becomes a shell command rather than a new privilege boundary being crossed. In the open-source edition any authenticated user reaches it. ## Suggested fix Run `pipinstall` through an argv array instead of a shell, matching `python_package_model.rb:95`: ```ruby pip_argv = ["-i", pypi_url] pip_argv += ["--trusted-host", URI.parse(pypi_url).host] unless ENV['PIP_ENABLE_TRUSTED_HOST'].nil? pip_argv += File.exist?(pyproject_path) ? [gem_path] : ["-r", requirements_path] OpenC3::ProcessManager.instance.spawn(["/openc3/bin/pipinstall"] + pip_argv, "plugin_pip_install", File.basename(gem_path), Time.now + 3600.0, scope: scope) ``` Optionally also validate `pypi_url` as an `http(s)` URL when the setting is written.

CVE-2026-77601 Affected OpenC3 COSMOS Versions

1 component(s)
Fixed Versions:
7.3.0
Product / Package Ecosystem Affected Versions Fixed Version
openc3
RubyGems
≥ 5.12.0
< 7.3.0
7.3.0

References

Frequently Asked Questions

What is CVE-2026-77601?
CVE-2026-77601 is a security vulnerability in OpenC3 COSMOS involving Authenticated OS command injection via the `pypi_url` setting under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which OpenC3 COSMOS versions are affected?
Affected versions include releases prior to 7.3.0 across affected packages: openc3.
What version fixes CVE-2026-77601?
Upgrading to 7.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is openc3 affected?
Yes, openc3 is affected in releases prior to 7.3.0. Upgrade your dependency to 7.3.0 or later.
What is the CVSS score of CVE-2026-77601?
CVE-2026-77601 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-77601?
CVE-2026-77601 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check RubyGems dependencies for CVE-2026-77601?
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-vp3w-52v9-q57f",
  "modified" : "2026-09-23T18:51:01Z",
  "published" : "2026-09-23T18:51:01Z",
  "aliases" : [ "CVE-2026-77601" ],
  "summary" : "OpenC3 COSMOS: Authenticated OS command injection via the `pypi_url` setting",
  "details" : "## Summary\nAn authenticated user can execute arbitrary operating system commands on the `openc3-cosmos-cmd-tlm-api` service. The `pypi_url` setting is interpolated, unescaped, into a command line that is run through a shell backtick when a plugin is installed. Shell metacharacters in the setting value are executed by `/bin/sh`.\n\n## Details\nThe `pypi_url` value is written through the `set_setting` API method, reachable over the JSON-RPC endpoint `POST /openc3-api/api`. In the open-source edition, `authorize` (`openc3/lib/openc3/utilities/authorization.rb`) verifies only that the session token is valid and returns the anonymous user; the `permission:` argument is not enforced, so any authenticated user can write the setting and install a plugin. In the Enterprise edition these actions require the admin role.\n\nDuring plugin install, `PluginModel.install_phase2` reads the setting and builds the argument string, then runs it through a backtick (`openc3/lib/openc3/models/plugin_model.rb:288`):\n\n```ruby\npypi_url = get_setting('pypi_url', scope: scope)   # attacker-controlled, no validation\npypi_url += '/simple' if pypi_url\npip_args = \"-i #{pypi_url} -r #{requirements_path}\"\noutput = `/openc3/bin/pipinstall #{pip_args}`        # Ruby backtick -> /bin/sh -c\n```\n\n`get_setting` appends `/simple` to the stored value, and a trailing `#` comments out that suffix and the remainder of the argument string. The python install branch runs whenever the installed plugin contains a `requirements.txt` or `pyproject.toml`, which the actor controls because they supply the plugin gem.\n\nThe sibling installer `openc3/lib/openc3/models/python_package_model.rb:95` performs the same `pipinstall` invocation using an argv array through `ProcessManager.spawn`, which does not involve a shell and is not injectable. `plugin_model.rb:288` is the single site that uses a backtick.\n\n## PoC\nConfirmed end-to-end over HTTP against a booted `openc3-cosmos-cmd-tlm-api` (puma) with Redis and bucket storage. Every request is authenticated.\n\n1. Obtain a session token:\n   ```\n   POST /openc3-api/auth/verify    {\"password\":\"<password>\"}\n   ```\n2. Write the setting (JSON-RPC):\n   ```\n   POST /openc3-api/api\n   {\"jsonrpc\":\"2.0\",\"method\":\"set_setting\",\n    \"params\":[\"pypi_url\",\"https://pypi.org ; id > /tmp/A1_PWNED 2>&1 ; #\"],\n    \"keyword_params\":{\"scope\":\"DEFAULT\"},\"id\":1}\n   ```\n3. Upload a plugin gem that contains a `requirements.txt`:\n   ```\n   POST /openc3-api/plugins     (multipart: plugin=@malicious.gem, scope=DEFAULT)\n   ```\n4. Install it:\n   ```\n   POST /openc3-api/plugins/install/<id>    (plugin_hash from step 3, scope=DEFAULT)\n   ```\n\nThe injected command executed inside the install process. Contents of the marker file written by the payload:\n```\nuid=1001(openc3) gid=1001(openc3) groups=1001(openc3)\n```\n\n## Impact\nArbitrary OS command execution as the `openc3` user (uid 1001) inside the cmd-tlm-api container. That process holds the Redis/Valkey password and the bucket (S3) credentials and operates across every scope, so command execution there exposes stored telemetry, commanding, and credentials, and allows tampering with any scope.\n\nIn the Enterprise edition the prerequisite is the admin role; the admin already has plugin-driven code execution by design, so the practical effect there is that a configuration value becomes a shell command rather than a new privilege boundary being crossed. In the open-source edition any authenticated user reaches it.\n\n## Suggested fix\nRun `pipinstall` through an argv array instead of a shell, matching `python_package_model.rb:95`:\n\n```ruby\npip_argv = [\"-i\", pypi_url]\npip_argv += [\"--trusted-host\", URI.parse(pypi_url).host] unless ENV['PIP_ENABLE_TRUSTED_HOST'].nil?\npip_argv += File.exist?(pyproject_path) ? [gem_path] : [\"-r\", requirements_path]\nOpenC3::ProcessManager.instance.spawn([\"/openc3/bin/pipinstall\"] + pip_argv, \"plugin_pip_install\", File.basename(gem_path), Time.now + 3600.0, scope: scope)\n```\n\nOptionally also validate `pypi_url` as an `http(s)` URL when the setting is written.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "openc3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.12.0"
      }, {
        "fixed" : "7.3.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 7.2.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/OpenC3/cosmos/security/advisories/GHSA-vp3w-52v9-q57f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenC3/cosmos/pull/3489"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenC3/cosmos/commit/be70d1d836c83c3b084e768e31a399312d4cbe0b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/OpenC3/cosmos"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/OpenC3/cosmos/releases/tag/v7.2.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-23T18:51:01Z",
    "nvd_published_at" : null
  }
}