1. CVE archive
  2. Vulnerability types
  3. CWE-1385
CWE-1385 · #261 most frequent type in the archive

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.

Part of: CWE-346 · Origin Validation Error

37CVEs of this type in the archive
5critical (CVSS ≥ 9)
12high severity (7–8.9)
Dec 2, 2026latest published

What it is

The product uses a WebSocket, but it does not properly verify that the source of data or communication is valid.

Impact on systems

ScopeImpact
Confidentiality, Integrity, Availability, Non-Repudiation, Access Control Varies by Context, Gain Privileges or Assume Identity, Bypass Protection Mechanism, Read Application Data, Modify Application Data, DoS: Crash, Exit, or Restart
This makes CSRF attacks more powerful. 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.

How to prevent it

Implementation Enable CORS-like access restrictions by verifying the 'Origin' header during the WebSocket handshake.
Implementation Use a randomized CSRF token to verify requests.
Implementation Use TLS to securely communicate using 'wss' (WebSocket Secure) instead of 'ws'.
Architecture and Design · Implementation Require user authentication prior to the WebSocket connection being established. For example, the WS library in Node has a 'verifyClient' function.
Implementation Leverage rate limiting to prevent against DoS. Use of the leaky bucket algorithm can help with this.
Implementation Use a library that provides restriction of the payload size. For example, WS library for Node includes 'maxPayloadoption' that can be set.
Implementation Treat data/input as untrusted in both directions and apply the same data/input sanitization as XSS, SQLi, etc.

Source: MITRE CWE catalog · Official entry on the MITRE website

CWE-1385 CVEs published per year

2026: year in progress, updated every hour

Show the data as a table
YearCVE
20231
20242
20259
202625

All CWE-1385 CVEs

37 results

Dottor Marc

Is this type of vulnerability in your systems?

An archive tells you what exists; a Vulnerability Assessment tells you what is exposed on your side. Dottor Marc tests your web applications and network with automated and manual checks.