GHSA-2wvh-87g2-89hr

Suggest an improvement
Source
https://github.com/advisories/GHSA-2wvh-87g2-89hr
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-2wvh-87g2-89hr/GHSA-2wvh-87g2-89hr.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-2wvh-87g2-89hr
Published
2026-04-23T14:17:53Z
Modified
2026-04-23T14:31:31.487614Z
Severity
  • 9.6 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N CVSS Calculator
Summary
OpenC3 COSMOS: Permissions Bypass Provides User Access to Unassigned Administrative Actions via Script Runner Tool
Details

Vulnerability Type: Execution with Unnecessary Privileges Attack type: Authenticated remote Impact: Data disclosure/manipulation, privilege escalation Affected components: The following docker images: • Openc3inc/openc3-COSMOS-script-runner-api

The Script Runner widget allows users to execute Python and Ruby scripts directly from the openc3-COSMOS-script-runner-api container. Because all the docker containers share a network, users can execute specially crafted scripts to bypass the API permissions check and perform administrative actions, including reading and modifying data inside the Redis database, which can be used to read secrets and change COSMOS settings, as well as read and write to the buckets service, which holds configuration, log, and plugin files. These actions are normally only available from the Admin Console or with administrative privileges. Any user with permission to create and run scripts can connect to any service in the docker network.

<img width="940" height="473" alt="image" src="https://github.com/user-attachments/assets/bf524163-127d-4349-999b-cefc53d4374d" />

Figure 1: Environment variables, including Redis credentials, found in the Script Runner container A Ruby script is used to expose the Redis username, password, hostname, and port. These credentials might also be found from the source code or through a brute-force attack.

<img width="940" height="507" alt="image" src="https://github.com/user-attachments/assets/6d3ccad4-949d-4eeb-a5f8-3aca48bbe815" />

Figure 2: A Python script is used to add data to Redis and retrieve the new data A Python script is then used to create a new entry in the Redis database called openc3__settings_hacked with a key of store_url and a value of http://hacked.com.

<img width="940" height="70" alt="image" src="https://github.com/user-attachments/assets/fcef13be-5416-4627-9c95-617a24674ee0" />

Figure 3: The new data found in the Redis database The new entry was successfully added to the Redis database, as is confirmed by using redis-cli. The following example shows how an attacker might change the plugin store URL file that is stored in the config bucket.

<img width="940" height="640" alt="image" src="https://github.com/user-attachments/assets/681b4dd6-4b6e-4a91-8480-0c9fbff76ede" />

Figure 4: Uploading file to change the plugin store URL setting

<img width="940" height="189" alt="image" src="https://github.com/user-attachments/assets/630db0bb-217e-4205-be1d-e9891516b22f" />

Figure 5: The URL file was successfully changed

Steps To Reproduce

  1. Run the following Ruby code to find the Redis credentials:
    puts `env | grep redis`
    
  2. Add the following Python script with the credentials to create a new entry and read it
    import redis
    import json
    import time
    
    r = redis.Redis(
        host = 'openc3-redis',
        port = 6379,
        username = 'openc3', 
        password = 'openc3password',  
        decode_responses=True
    )
    
    # Save a setting
    setting_data = {
        'name': 'store_url',
        'data': 'http://hacked.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'))
    

Recommendations

• Limit the permissions of the script runner API to prevent lower level users from performing administrative actions

Database specific
{
    "github_reviewed": true,
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-250"
    ],
    "github_reviewed_at": "2026-04-23T14:17:53Z",
    "severity": "CRITICAL"
}
References

Affected packages

RubyGems / openc3

Package

Name
openc3
Purl
pkg:gem/openc3

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
7.0.0-rc3

Affected versions

5.*
5.0.6
5.0.7
5.0.8
5.0.9
5.0.10
5.0.11
5.1.0
5.1.1
5.2.0
5.3.0
5.4.0
5.4.1
5.4.2
5.4.3.pre.beta0
5.5.0.pre.beta0
5.5.0
5.5.1
5.5.2.pre.beta0
5.5.2
5.6.0
5.6.1
5.7.0
5.7.2
5.8.0
5.8.1
5.9.0
5.9.1
5.10.0
5.10.1
5.11.0
5.11.1
5.11.2
5.11.3
5.12.0
5.13.0
5.14.0
5.14.1
5.14.2
5.15.0
5.15.1
5.15.2
5.16.0
5.16.1
5.16.2
5.17.0
5.17.1
5.18.0
5.19.0
5.20.0
6.*
6.0.0
6.0.1
6.0.2
6.1.0
6.2.0
6.2.1
6.3.0
6.4.0
6.4.1
6.4.2
6.5.0
6.5.1
6.6.0
6.7.0
6.8.0
6.8.1
6.9.0
6.9.1
6.9.2
6.10.0
6.10.1
6.10.2
6.10.3
6.10.4
6.10.5
7.*
7.0.0.pre.rc1
7.0.0.pre.rc2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-2wvh-87g2-89hr/GHSA-2wvh-87g2-89hr.json"