Executive brief
OpenC3 COSMOS is a command and telemetry system for spacecraft operations and mission control. Users with screen-editing permissions can inject malicious JavaScript into BUTTON widgets on shared telemetry screens. When other operators view and interact with these screens, the attacker's code executes in their authenticated browser sessions, allowing theft of session tokens and account takeover without any user interaction beyond normal job duties.
Technical details
The vulnerability is a stored, cross-user XSS in the BUTTON widget implementation. The root cause: the BUTTON widget stores user-supplied action code as plain text in the database (no sanitization in `ScreensController#create`), then executes it via `eval()` in the browser when clicked (`ButtonWidget.vue:109`). Screens are shared across users within a scope, so JavaScript injected by user A runs in user B's authenticated session. An attacker with `system_set` permission can save a screen with a malicious BUTTON action; any user viewing that screen will execute the injected code in their security context. The payload can exfiltrate `localStorage.openc3Token` (the session bearer token) or pivot to the Script Runner for server-side code execution. The site's permissive Content-Security-Policy (`'unsafe-inline' 'unsafe-eval'`) does not block injected or eval'd code. Patch status: not yet released as of the advisory publication date.
Affected products
- OpenC3 COSMOS 7.2.0 and likely earlier; code path present on main branch
Timeline
- 2026-09-23: disclosed: GHSA-gvf2-2rh5-mpgf published
- 2026-06-25: other: Vulnerability confirmed in version 7.2.0 (latest tested at disclosure)