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 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.

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

  1. https://cwe.mitre.org/data/definitions/1385.html

(incoming)4

TypeTargetConfidenceTier
VulnerabilityCVE-2025-24964cve-2025-249640%live
VulnerabilityCVE-2025-54289cve-2025-542890%live
VulnerabilityCVE-2026-34403cve-2026-344030%live
VulnerabilityCVE-2026-35589cve-2026-355890%live

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CWE
Improper Verification of Source of a Communication Channel
CWE
Weak Authentication
CWE
Reliance on Cookies without Validation and Integrity Checking
CWE
Improper Enforcement of Message Integrity During Transmission in a Communication Channel
CWE
Insufficiently Protected Credentials
CWE
Permissive Cross-domain Security Policy with Untrusted Domains
Sourced from MITRE CWE 4.20. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.