GHSA-RGWV-X7H5-F7J3
AIT-Core OpenMCT plugin: unauthenticated WebSocket `unsubscribe` with no argument crashes the connection handler (DoS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-RGWV-X7H5-F7J3 divulgada · CVSS 5.3 (GitHub) | |
| Remediación | Parche 3.1.2 | ait-core · 6 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Description
Summary
The AIT-Core OpenMCT server plugin exposes an unauthenticated `gevent` WSGI/WebSocket service bound to `0.0.0.0` with a wide-open CORS policy. Its WebSocket message handler guards the `subscribe` directive with `len(msg_parts) > 1` but the sibling `unsubscribe` directive has no such guard: a bare `"unsubscribe"` frame makes `msg_parts[1]` raise an uncaught `IndexError`, terminating the connection's handler greenlet. A companion set of unhandled exceptions on the `/tlm/history/<id>` HTTP route on the same service produce the same class of crash.
Details
Source: `ait/core/server/plugins/openmct.py` (HEAD `3863f4c`).
- Unauthenticated service: `AITOpenMctPlugin.init()` (~line 556) binds `gevent.pywsgi.WSGIServer(("0.0.0.0", self._servicePort), ...)` with no authentication and `Access-Control-Allow-Origin: *` (~line 602).
- WS handler `process_websocket_mesg` (~lines 1163-1179): the `subscribe` branch requires `len(msg_parts) > 1`; the `unsubscribe` branch does `mws.unsubscribe_field(msg_parts[1])` with no length check, so a frame of exactly `"unsubscribe"` raises `IndexError` (uncaught through `poll_websocket` → `manage_web_socket` → the per-connection greenlet).
- Companion `/tlm/history/<mct_pkt_id>` route (`get_historical_tlm` ~741, `get_historical_tlm_for_packet_fields` ~831): `float(request.query.start/end)` outside try/except (`ValueError`), `self._aitTlmDict[ait_pkt_id]` outside the try block (`KeyError`), and `parse_mct_pkt_id` unpacking `id.split(".")` into two names (`ValueError` when the id has ≥2 dots).
PoC
Non-weaponized; source-confirmed at HEAD and reproduced by replicating the exact branch logic. `python3 poc.py` mirrors the directive dispatch (including the missing `unsubscribe` guard) and feeds `"unsubscribe"`, showing the uncaught `IndexError`. End-to-end: open the plugin's `/tlm/realtime` WebSocket on the `0.0.0.0` port and send `unsubscribe` — no account, dictionary trust, or local access required.
Impact
Uncaught exception → availability impact, reachable by any unauthenticated network host that can reach the OpenMCT plugin port. Crashes the connection greenlet and floods logs; repeated abuse degrades the realtime-telemetry service. Distinct from the published AIT-Core BSC path traversal (CVE-2026-47731) and from the known eval/yaml/seq findings. Suggested fix: add `len(msg_parts) > 1` to the `unsubscribe` branch; wrap the realtime/history handlers in try/except returning HTTP 4xx; require auth or bind localhost by default.
Fix Information
- WebSocket Unsubscribe DoS (IndexError crash)
- Fix: Added length validation to the unsubscribe directive in process_websocket_mesg()
- Location: ait/core/server/plugins/openmct.py
- Details: Now validates len(msg_parts) > 1 before accessing msg_parts[1], matching the existing subscribe validation pattern
- Historical Telemetry HTTP Route Exceptions
- Fix: Added exception handling in get_historical_tlm() and get_historical_tlm_for_packet_fields()
- Location: ait/core/server/plugins/openmct.py (routes /tlm/history/<mct_pkt_id>)
- Details:
- Wrapped float(request.query.start/end) in try/except, returns HTTP 400 on ValueError
- Added KeyError handling for invalid ait_pkt_id lookups, returns empty result set
- Added proper error handling for parse_mct_pkt_id unpacking failures
- Default Bind Address
- Fix: Changed default bind address from 0.0.0.0 to 127.0.0.1
- Note: Bind address is configurable via bind_address parameter for users who require network exposure
Patch Version
v3.1.2
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
pypiait-core |
Corregida | 3.1.2 | 6 d | 3.1.2 no afectada |
3.1.2Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/NASA-AMMOS/AIT-Core/security/advisories/GHSA-rgwv-x7h5-f7j3Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
