Descrizione
RabbitMQ is a messaging and streaming broker. Prior to versions 3.13.15, 4.0.20, 4.1.11, 4.2.6, and 4.3.0, Neither the Web-MQTT handler (deps/rabbitmq_web_mqtt/src/rabbit_web_mqtt_handler.erl:104) nor the Web-STOMP handler (deps/rabbitmq_web_stomp/src/rabbit_web_stomp_handler.erl:102) validates the Origin header on the WebSocket upgrade. Under ssl_cert_login=true, the browser presents the client certificate automatically, so an attacker's JavaScript running in the victim's browser can authenticate as the victim. Preconditions include The non-default configuration use_http_auth=true (Web-STOMP) or ssl_cert_login=true (both plugins) must be enabled. The issue is harmless under the default in-band CONNECT credential configuration.. This issue is fixed in versions 3.13.15, 4.0.20, 4.1.11, 4.2.6, and 4.3.0.
Tipo di vulnerabilità
CWE-1385
Missing Origin Validation in WebSockets
The product uses a WebSocket, but it does not properly verify that the source of data or communication is valid.
Impatto sui sistemi
| Ambito | Impatto |
| Riservatezza, Integrità, Disponibilità, Non ripudio, Controllo degli accessi |
Dipende dal contesto, Ottenere privilegi o assumere un’altra identità, Aggirare i meccanismi di protezione, Leggere i dati dell’applicazione, Modificare i dati dell’applicazione, Interruzione del servizio: arresto o riavvio |
Come si previene
Sviluppo
Enable CORS-like access restrictions by verifying the 'Origin' header during the WebSocket handshake.
Sviluppo
Use a randomized CSRF token to verify requests.
Sviluppo
Use TLS to securely communicate using 'wss' (WebSocket Secure) instead of 'ws'.
Architettura e progettazione · Sviluppo
Require user authentication prior to the WebSocket connection being established. For example, the WS library in Node has a 'verifyClient' function.
Sviluppo
Leverage rate limiting to prevent against DoS. Use of the leaky bucket algorithm can help with this.
Sviluppo
Use a library that provides restriction of the payload size. For example, WS library for Node includes 'maxPayloadoption' that can be set.
Sviluppo
Treat data/input as untrusted in both directions and apply the same data/input sanitization as XSS, SQLi, etc.
Tutte le 37 CVE di tipo CWE-1385, con andamento e prevenzione