CWEweakness
CWE-1385 Missing Origin Validation in WebSockets
- Alternate terms
- Cross-Site WebSocket hijacking (CSWSH)
- Abstraction
- Variant
- Structure
- Simple
- Status
- Incomplete
- Languages
- Go, Not Language-Specific
- CWE version
- 5.0
Description
The product uses a WebSocket, but it does not properly verify that the source of data or communication is valid.
Common consequences
• 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.
Potential mitigations
• [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.
Observed examples
• CVE-2020-25095: web console for SIEM product does not check Origin header, allowing Cross Site WebSocket Hijacking (CSWH)
• CVE-2018-6651: Chain: gaming client attempts to validate the Origin header, but only uses a substring, allowing Cross-Site WebSocket hijacking by forcing requests from an origin whose hostname is a substring of the valid origin.
• CVE-2018-14730: WebSocket server does not check the origin of requests, allowing attackers to steal developer's code using a ws://127.0.0.1:3123/ connection.
• CVE-2018-14731: WebSocket server does not check the origin of requests, allowing attackers to steal developer's code using a ws://127.0.0.1/ connection to a randomized port number.
• CVE-2018-14732: WebSocket server does not check the origin of requests, allowing attackers to steal developer's code using a ws://127.0.0.1:8080/ connection.
Related
Observed example · CVE (5)
- CVE-2020-25095 LogRhythm Platform Manager (PM) 7.4.9 allows CSRF. vulnerability
- CVE-2018-14730 An issue was discovered in Browserify-HMR. vulnerability
- CVE-2018-14731 An issue was discovered in HMRServer.js in Parcel parcel-bundler. vulnerability
- CVE-2018-14732 An issue was discovered in lib/Server.js in webpack-dev-server before 3.1.6. vulnerability
- CVE-2018-6651 In the uncurl_ws_accept function in uncurl.c in uncurl before 0.07, as used in Parsec before 140-3, insufficient Origin header validation… vulnerability
Child of · CWE (1)
- CWE-346 Origin Validation Error weakness
Referenced by CVE · weakness (49)
- CVE-2026-107858 Missing Origin Validation in WebSockets (CWE-1385) and Permissive Cross-domain Policy with Untrusted Domains (CWE-942) in the development… vulnerability
- CVE-2026-55463 The Goobi viewer is a web application that allows digitised material to be displayed in a web browser. vulnerability
- CVE-2026-112085 webpack-dev-server is a development server that provides live reloading for webpack projects. vulnerability
- CVE-2026-85267 A Cross-Site WebSocket Hijacking vulnerability in Cloud Shell prior to 2026-07-22 on Google Cloud Platform allows an unauthenticated… vulnerability
- CVE-2026-109330 Network-AI 5.0.0 before 5.15.2 contains a cross-site WebSocket hijacking vulnerability in DashboardServer that allows remote attackers to… vulnerability
- CVE-2026-77363 obsidian-tc is a governed, agent-ready Model Context Protocol server for Obsidian vaults. vulnerability
- CVE-2026-104380 Punk versions from 0.48 before 0.55 for Perl route Extended CONNECT requests to any GET route without an Origin check in ps_serve_one. vulnerability
- CVE-2026-67405 RabbitMQ is a messaging and streaming broker. vulnerability
- CVE-2026-54565 rhwp is an HWP viewer and editor implemented in Rust and WebAssembly. vulnerability
- CVE-2026-13272 IBM Verify Identity Access is missing origin validation which could allow a remote attacker to perform operations as the victim and… vulnerability
- CVE-2026-18251 IBM i 7.6, 7.5, 7.4, and 7.3 could allow a remote attacker to obtain sensitive information due to improper validation of the WebSocket… vulnerability
- CVE-2026-71416 Headroom compresses data before the data reaches a large language model. vulnerability
- CVE-2026-88061 career-ops is an open-source AI-assisted job search and application management tool. vulnerability
- CVE-2026-85183 Taipy configures its socket.io server with wildcard CORS origin and credential flag enabled, allowing any web page to establish… vulnerability
- CVE-2026-15580 vault token disclosure via unvalidated postMessage vulnerability in N-able PassPortal allows Authentication Abuse. vulnerability
- CVE-2026-59950 The MCP Python SDK, called mcp on PyPI, is a Python implementation of the Model Context Protocol (MCP). vulnerability
- CVE-2026-57111 Permissive Cross-Origin Resource Sharing (CORS) in the REST API (helix-rest, org.apache.helix.rest.server.filters.CORSFilter) in Apache… vulnerability
- CVE-2026-59804 Midscene Bridge Server through 1.10.3, fixed in commit 86f4118, contains a missing authentication and CORS misconfiguration vulnerability… vulnerability
- CVE-2026-10054 In affected versions of Eclipse Theia (1.8.1 and later), the browser backend exposes privileged terminal RPC over WebSocket… vulnerability
- CVE-2026-44211 Cline is an autonomous coding agent as an SDK, IDE extension, or CLI assistant. vulnerability
- CVE-2026-44514 Kubetail is a real-time logging dashboard for Kubernetes. vulnerability
- CVE-2026-34403 Nginx UI is a web user interface for the Nginx web server. vulnerability
- CVE-2026-35589 nanobot is a personal AI assistant. vulnerability
- CVE-2026-27977 Next.js is a React framework for building full-stack web applications. vulnerability
- CVE-2026-1692 A missing origin validation in WebSockets vulnerability affects the GraphicalData web services used by the WebVue, WebScheduler, TouchVue… vulnerability
- CVE-2025-68930 Versions of the Traccar open-source GPS tracking system up to and including 6.11.1 contain a Cross-Site WebSocket Hijacking (CSWSH)… vulnerability
- CVE-2025-56647 npm @farmfe/core before 1.7.6 is Missing Origin Validation in WebSocket. vulnerability
- CVE-2026-22689 Mailpit is an email testing tool and API for developers. vulnerability
- CVE-2026-21883 Bokeh is an interactive visualization library written in Python. vulnerability
- CVE-2025-61987 GroupSession Free edition prior to ver5.3.0, GroupSession byCloud prior to ver5.3.3, and GroupSession ZION prior to ver5.3.2. vulnerability
Referenced by CWE · has member (1)
- CWE-1468 Weaknesses Addressed by the OWASP Golang Secure Coding Practices Guide view
Referenced by OWASP · mapped cwe (1)
- CS-WebSocket_Security WebSocket Security Cheat Sheet Cheat Sheet