This vulnerability occurs when a WebSocket connection is established without verifying the origin of incoming messages, allowing potentially malicious data from untrusted sources.
WebSockets enable persistent, two-way communication between a client and server, which is ideal for real-time features. Unlike standard HTTP requests, these connections stay open and are not automatically restricted by browser security policies like the Same-Origin Policy (SOP) or Cross-Origin Resource Sharing (CORS). This means a WebSocket can receive messages from any origin unless the server explicitly validates where the connection is coming from. Without proper origin checks, attackers can exploit these open channels to launch powerful Cross-Site Request Forgery (CSRF) attacks or send malicious data. To prevent this, developers must implement server-side validation for every WebSocket connection request, ensuring it originates from a trusted and expected domain before allowing communication to proceed.
Impact: Varies by ContextGain Privileges or Assume IdentityBypass Protection MechanismRead Application DataModify Application DataDoS: Crash, Exit, or Restart
The consequences will vary depending on the nature of the functionality that is vulnerable to CSRF. An attacker could effectively perform any operations as the victim. If the victim is an administrator or privileged user, the consequences may include obtaining complete control over the web application - deleting or stealing data, uninstalling the product, or using it to launch other attacks against all of the product's users. Because the attacker has the identity of the victim, the scope of the CSRF is limited only by the victim's privileges.
Effectiveness: Defense in Depth
Effectiveness: Defense in Depth