Skip to content

Commit 71d90d7

Browse files
1 parent 4aa24cb commit 71d90d7

2 files changed

Lines changed: 145 additions & 0 deletions

File tree

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-4jvx-93h3-f45h",
4+
"modified": "2026-04-22T22:22:03Z",
5+
"published": "2026-04-22T22:22:02Z",
6+
"aliases": [],
7+
"summary": "OpenC3 COSMOS allows arbitrary writes to plugins directory via path-traversed config filenames",
8+
"details": "### Summary\nOpenC3 COSMOS contains a design flaw in the `save_tool_config()` function that allows saving tool configuration files at arbitrary locations inside the shared `/plugins` directory tree by supplying crafted configuration filenames. Although the implementation sufficiently mitigates standard path traversal attacks, by canonicalizing filename to an absolute path, all plugins share this same root directory. That enables users to create arbitrary file structures and overwrite existing configuration files within the shared `/plugins` directory.\n\n### Details\nIn function `save_tool_config()` ([local_mode.rb](https://github.com/OpenC3/cosmos/blob/397abec0d57972881a2e8dc10902d0dce9c27f42/openc3/lib/openc3/utilities/local_mode.rb#L452)) responsible for saving user-supplied tool configuration, the desired saving directory is not sufficiently enforced, instead allowing writes inside entire `OPENC3_LOCAL_MODE_PATH`.\n\n### PoC\n1.\tNavigate to any tool that enables “Save Configuration” option in left-hand drop-down menu (here Limits Monitor as an example)\n2.\tSave a new config with path traversal name using “../” sequences to escape desired directory (up to 3 levels high)\n3.\tObserve new files created in /plugins directory by inspecting docker container directly (`openc3-COSMOS-cmd-tlm-api`) or using Bucket Explorer (`plugin_default`)\n\n<img width=\"811\" height=\"584\" alt=\"image\" src=\"https://github.com/user-attachments/assets/015a59b4-8b18-4801-aef0-df4831d5c1c3\" />\n<img width=\"720\" height=\"664\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8ca4a5b7-ee45-4c3b-99f6-f41f974a74a7\" />\n\n### Impact\nModifying the data of other plugins",
9+
"severity": [
10+
{
11+
"type": "CVSS_V3",
12+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "RubyGems",
19+
"name": "openc3"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "0"
27+
},
28+
{
29+
"fixed": "6.10.5"
30+
}
31+
]
32+
}
33+
]
34+
},
35+
{
36+
"package": {
37+
"ecosystem": "RubyGems",
38+
"name": "openc3"
39+
},
40+
"ranges": [
41+
{
42+
"type": "ECOSYSTEM",
43+
"events": [
44+
{
45+
"introduced": "7.0.0.pre.rc1"
46+
},
47+
{
48+
"fixed": "7.0.0-rc3"
49+
}
50+
]
51+
}
52+
]
53+
}
54+
],
55+
"references": [
56+
{
57+
"type": "WEB",
58+
"url": "https://github.com/OpenC3/cosmos/security/advisories/GHSA-4jvx-93h3-f45h"
59+
},
60+
{
61+
"type": "WEB",
62+
"url": "https://github.com/OpenC3/cosmos/commit/9957a9fa460c0c0cf5cdbf6a5931bbdd025246a5"
63+
},
64+
{
65+
"type": "WEB",
66+
"url": "https://github.com/OpenC3/cosmos/commit/e6efccbd148ba0e3361c5891027f2373aa140d42"
67+
},
68+
{
69+
"type": "PACKAGE",
70+
"url": "https://github.com/OpenC3/cosmos"
71+
},
72+
{
73+
"type": "WEB",
74+
"url": "https://github.com/OpenC3/cosmos/releases/tag/v6.10.5"
75+
},
76+
{
77+
"type": "WEB",
78+
"url": "https://github.com/OpenC3/cosmos/releases/tag/v7.0.0-rc3"
79+
}
80+
],
81+
"database_specific": {
82+
"cwe_ids": [
83+
"CWE-23"
84+
],
85+
"severity": "MODERATE",
86+
"github_reviewed": true,
87+
"github_reviewed_at": "2026-04-22T22:22:02Z",
88+
"nvd_published_at": null
89+
}
90+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-ffq5-qpvf-xq7x",
4+
"modified": "2026-04-22T22:22:28Z",
5+
"published": "2026-04-22T22:22:28Z",
6+
"aliases": [],
7+
"summary": "OpenC3 COSMOS is Vulnerable to Self-XSS Through the Command Sender",
8+
"details": "### Summary\nThe Command Sender UI uses an unsafe `eval()` function on array-like command parameters, which allows a user-supplied payload to execute in the browser when sending a command. This creates a self-XSS risk because an attacker can trigger their own script execution in the victim’s session, if allowed to influence the array parameter input, for example via phishing. If successful, an attacker may read or modify data in the authenticated browser context, including session tokens in local storage.\n\n### Details\nThe unsafe `eval()` usage on user-supplied ARRAY parameters happens in `convertToValue` method in [CommandSender.vue](https://github.com/OpenC3/cosmos/blob/main/openc3-cosmos-init/plugins/packages/openc3-cosmos-tool-cmdsender/src/tools/CommandSender/CommandSender.vue)\n\n### PoC\n1.\tUsing a drop-down form, choose any command that supports ARRAY parameters,\n2.\tInside square brackets “[…]” place a JavaScript code to be executed\n3.\tSend command to CmdTlmServer using dedicated “Send” button \n4.\tObserve JavaScript code being executed in the current browser session context\n\nBelow example uses `INST ARYCMD` to execute simple JavaScript code snippet `alert(“XSS”)`.\n<img width=\"947\" height=\"356\" alt=\"image\" src=\"https://github.com/user-attachments/assets/6fbdb6c9-616a-4268-bbb8-a8a1044437ad\" />\n\n<img width=\"942\" height=\"545\" alt=\"image\" src=\"https://github.com/user-attachments/assets/4df24353-aea0-4aa0-adcf-b7c7e387dc83\" />\n\n### Impact\nLocal JavaScript execution in the user's browser",
9+
"severity": [
10+
{
11+
"type": "CVSS_V3",
12+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "RubyGems",
19+
"name": "openc3"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "0"
27+
},
28+
{
29+
"fixed": "7.0.0"
30+
}
31+
]
32+
}
33+
]
34+
}
35+
],
36+
"references": [
37+
{
38+
"type": "WEB",
39+
"url": "https://github.com/OpenC3/cosmos/security/advisories/GHSA-ffq5-qpvf-xq7x"
40+
},
41+
{
42+
"type": "PACKAGE",
43+
"url": "https://github.com/OpenC3/cosmos"
44+
}
45+
],
46+
"database_specific": {
47+
"cwe_ids": [
48+
"CWE-79"
49+
],
50+
"severity": "MODERATE",
51+
"github_reviewed": true,
52+
"github_reviewed_at": "2026-04-22T22:22:28Z",
53+
"nvd_published_at": null
54+
}
55+
}

0 commit comments

Comments
 (0)