目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336

100%

CWE-1385 类漏洞列表 33

CWE-1385 类弱点 33 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-1385 指 WebSocket 通信中缺失源验证的漏洞,属于身份验证缺陷。攻击者常通过构造恶意网页,利用受害者浏览器建立 WebSocket 连接,从而窃取敏感数据或执行未授权操作。开发者应在握手阶段严格校验 Origin 头部,确保仅接受来自可信域名的请求,并实施白名单机制,以有效防止跨站 WebSocket 劫持风险。

MITRE CWE 官方描述
CWE:CWE-1385 WebSockets 中缺少源验证 (Missing Origin Validation in WebSockets) 英文:产品使用了 WebSocket,但未正确验证数据或通信来源的有效性。 WebSocket 在客户端和服务器之间提供双向低延迟通信(近实时)。WebSocket 与 HTTP 的不同之处在于,连接是长连接的,因为通道将保持打开状态,直到客户端或服务器准备发送消息,而在 HTTP 中,一旦响应发生(通常立即发生),事务即完成。WebSocket 可以利用端口 80 和 443 上的现有 HTTP 协议,但不局限于 HTTP。WebSocket 可以发起跨域请求,这些请求不受基于浏览器的保护机制(如同源策略 (Same Origin Policy, SOP) 或跨源资源共享 (Cross-Origin Resource Sharing, CORS))的限制。如果没有显式的源验证,这将使跨站请求伪造 (CSRF) 攻击更加强大。
常见影响 (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 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 applicati…
缓解措施 (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.
Effectiveness: Defense in Depth
CVE ID 标题 CVSS 风险等级 Published
CVE-2023-26114 Coder Code-Server 访问控制错误漏洞 — code-server 8.2 High 2023-03-23
CVE-2023-0957 Gitpod 访问控制错误漏洞 — Gitpod 8.2 High 2023-03-03
CVE-2014-125071 The Gribbit Web Framework 访问控制错误漏洞 — Gribbit 5.5 Medium 2023-01-09

CWE-1385 是常见的弱点类别,本平台收录该类弱点关联的 33 条 CVE 漏洞。