/

CVE-2026-77602

Severity:

CRITICAL RISK

(9.9)

Code Injection (CWE-94) in OpenC3 COSMOS Config Paths

CVE-2026-77602

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OpenC3 COSMOS contains code-injection paths in which authenticated non-administrator users can place content under targets_modified/ that is later evaluated as Ruby or Python code.

When configuration reloads, table processing, or suite analysis is triggered, the content may execute in internal services with access to application credentials and data.

Affected context

The issue affects OpenC3 COSMOS deployments where authenticated users who are not administrators can create or upload content that reaches modified target configuration or suite procedure paths. Multiple components process this content through configuration parsers, ERB rendering, Ruby or Python evaluation, or Ruby require, potentially executing it below the intended code-execution privilege tier.

Exploit preconditions

  • Attack surface: COSMOS storage, screen-save, script-creation, configuration, and suite-analysis workflows
  • Required access: An authenticated non-administrator account with permission to create or modify relevant content
  • Trigger point: Table processing, command or telemetry reloads, or suite analysis
  • Why exploitation is possible: User-controlled files under targets_modified/ can reach processing paths that evaluate or load content as executable Ruby or Python code

Why this happens

The vulnerability results from treating user-influenced configuration and procedure content as executable code. Processing paths such as ConfigParser, PacketConfig, conversion handlers, ERB rendering, and Ruby require cross a trust boundary without adequately restricting the content to declarative configuration.

This behavior maps to CWE-94: Improper Control of Generation of Code ('Code Injection'), because attacker-controlled data can influence code evaluation or loading in services that possess broader privileges and access than the submitting user.

Potential impact

  • An attacker may execute arbitrary Ruby or Python code in affected COSMOS services
  • Compromised services could expose internal credentials, telemetry, commands, or other application data
  • Attackers could alter embedded-system configuration or influence command and telemetry processing
  • The compromise could enable lateral movement within the deployment environment
  • Malicious content could persist through configuration, script, or storage workflows

General mitigation guidance

Mitigation generally focuses on preserving the boundary between declarative configuration and executable code.

Common defensive patterns include:

  • Using data-only parsers and restricted schemas for tables, commands, telemetry, and other configuration
  • Removing or tightly constraining ERB, dynamic evaluation, and unrestricted module loading for user-controlled content
  • Treating uploaded files and generated scripts as untrusted, with explicit type, size, and content validation
  • Limiting which authenticated roles can write to targets_modified/ or trigger reload and analysis workflows
  • Running processing services with least privilege and narrowly scoped access to credentials, files, and internal networks
  • Isolating configuration-processing and script-running components with separate identities and restricted capabilities
  • Applying immutable or controlled storage policies to runtime configuration and procedure locations

How teams detect issues like this

Detection programs can look for:

  • Static-analysis findings involving Ruby require, dynamic evaluation, ERB rendering, Python evaluation, and conversion handlers applied to user-controlled data
  • Code-review signals showing uploaded or generated files reaching configuration reload, packet conversion, or suite analysis paths
  • Access-control policies that allow non-administrative users to write executable or executable-like content
  • Runtime monitoring for unexpected file creation under targets_modified/, unusual reload activity, and child-process or interpreter launches
  • Audit events linking storage uploads or script creation to command, telemetry, or suite-processing operations
  • Automated security review tools that flag code and data trust-boundary violations

Sources

SourceLink
github.comgithub.com/OpenC3/cosmos/commit/71943352a28128ef3e7e894319d97a656b5cd4f2
github.comgithub.com/OpenC3/cosmos/commit/7a1538a4626f82c0d1540fcaa27ffdcbbd71ff81
github.comgithub.com/OpenC3/cosmos/pull/3488
github.comgithub.com/OpenC3/cosmos/security/advisories/GHSA-jjq7-m736-w977

Frequently asked

questions

Exploitation generally requires an authenticated account that can create or modify content accepted by the affected storage, configuration, or script workflows. Administrative privileges are not necessarily required.

No. The attacker must have access to an authorized content-creation path and must cause a relevant processing, reload, or suite-analysis operation to occur.

Keep user-controlled content data-only, remove unnecessary dynamic evaluation and module loading, and enforce strict schemas and authorization around upload and processing workflows.

Enforce least privilege, isolate code-processing services, restrict writes to executable paths, validate content before storage and execution, and monitor file and reload activity across configuration pipelines.

Find out what's already
exploitable in your codebase.