VariantIncomplete
CWE-1385Missing Origin Validation in WebSockets
Category: other
Description
The product uses a WebSocket, but it does not properly verify that the source of data or communication is valid.
Common consequences· 1
- 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 RestartThe 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.
Potential mitigations· 5
- [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.
References
(incoming)4
| Type | Target | Confidence | Tier |
|---|---|---|---|
| Vulnerability | CVE-2025-24964cve-2025-24964 | 0% | live |
| Vulnerability | CVE-2025-54289cve-2025-54289 | 0% | live |
| Vulnerability | CVE-2026-34403cve-2026-34403 | 0% | live |
| Vulnerability | CVE-2026-35589cve-2026-35589 | 0% | live |
Related by meaning· 6
Nearest entities by semantic similarity across the cs-graph corpus.