What problem does it solve?
WebSocket applications can be vulnerable during the upgrade handshake, session binding, and message handling, enabling cross-site WebSocket hijacking, injection, and transport-layer weaknesses.
Core Features & Use Cases
- WebSocket handshake review: Verify required headers and interpret server 101 responses to confirm correct protocol negotiation.
- CSWSH risk assessment: Check whether Origin validation is missing and whether cookie/session rules allow a victim to be impersonated.
- Tooling and vulnerability coverage: Guide practical testing with wsrepl and ws-harness concepts, plus common flaws like token leakage in URLs, weak transport (ws://), rate limits, and message injection.
- Execution decision framework: Use a stepwise decision tree to align WebSocket testing with related REST authentication/authorization boundaries.
Quick Start
Use websocket-security to validate the WebSocket handshake headers, test whether Origin is enforced for CSWSH resistance, and probe message handling for injection and authorization gaps on an authorized target.