-
Notifications
You must be signed in to change notification settings - Fork 598
Expand file tree
/
Copy pathGHSA-2wvh-87g2-89hr.json
More file actions
55 lines (55 loc) · 4.57 KB
/
GHSA-2wvh-87g2-89hr.json
File metadata and controls
55 lines (55 loc) · 4.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
"schema_version": "1.4.0",
"id": "GHSA-2wvh-87g2-89hr",
"modified": "2026-04-23T14:17:55Z",
"published": "2026-04-23T14:17:53Z",
"aliases": [],
"summary": "OpenC3 COSMOS: Permissions Bypass Provides User Access to Unassigned Administrative Actions via Script Runner Tool",
"details": "**Vulnerability Type: Execution with Unnecessary Privileges\nAttack type: Authenticated remote\nImpact: Data disclosure/manipulation, privilege escalation\nAffected components: The following docker images:\n•\tOpenc3inc/openc3-COSMOS-script-runner-api**\n\nThe 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. \n \n<img width=\"940\" height=\"473\" alt=\"image\" src=\"https://github.com/user-attachments/assets/bf524163-127d-4349-999b-cefc53d4374d\" />\n\nFigure 1: Environment variables, including Redis credentials, found in the Script Runner container\nA 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.\n \n<img width=\"940\" height=\"507\" alt=\"image\" src=\"https://github.com/user-attachments/assets/6d3ccad4-949d-4eeb-a5f8-3aca48bbe815\" />\n\nFigure 2: A Python script is used to add data to Redis and retrieve the new data\nA 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`.\n \n<img width=\"940\" height=\"70\" alt=\"image\" src=\"https://github.com/user-attachments/assets/fcef13be-5416-4627-9c95-617a24674ee0\" />\n\nFigure 3: The new data found in the Redis database\nThe new entry was successfully added to the Redis database, as is confirmed by using `redis-cli`. \nThe following example shows how an attacker might change the plugin store URL file that is stored in the config bucket.\n \n<img width=\"940\" height=\"640\" alt=\"image\" src=\"https://github.com/user-attachments/assets/681b4dd6-4b6e-4a91-8480-0c9fbff76ede\" />\n\nFigure 4: Uploading file to change the plugin store URL setting\n \n<img width=\"940\" height=\"189\" alt=\"image\" src=\"https://github.com/user-attachments/assets/630db0bb-217e-4205-be1d-e9891516b22f\" />\n\nFigure 5: The URL file was successfully changed\n###\tSteps To Reproduce\n1.\tRun the following Ruby code to find the Redis credentials:\n```ruby\nputs `env | grep redis`\n```\n3.\tAdd the following Python script with the credentials to create a new entry and read it\n```python\nimport redis\nimport json\nimport time\n\nr = redis.Redis(\n host = 'openc3-redis',\n port = 6379,\n username = 'openc3', \n password = 'openc3password', \n decode_responses=True\n)\n\n# Save a setting\nsetting_data = {\n 'name': 'store_url',\n 'data': 'http://hacked.com',\n 'updated_at': time.time_ns()\n}\nr.hset('openc3__settings_hacked','store_url',json.dumps(setting_data))\nprint(r.hget('openc3__settings_hacked','store_url'))\n```\n\n###\tRecommendations\n•\tLimit the permissions of the script runner API to prevent lower level users from performing administrative actions",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:P/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:H"
}
],
"affected": [
{
"package": {
"ecosystem": "RubyGems",
"name": "openc3"
},
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "7.0.0-rc3"
}
]
}
]
}
],
"references": [
{
"type": "WEB",
"url": "https://github.com/OpenC3/cosmos/security/advisories/GHSA-2wvh-87g2-89hr"
},
{
"type": "PACKAGE",
"url": "https://github.com/OpenC3/cosmos"
}
],
"database_specific": {
"cwe_ids": [
"CWE-250"
],
"severity": "HIGH",
"github_reviewed": true,
"github_reviewed_at": "2026-04-23T14:17:53Z",
"nvd_published_at": null
}
}