websocket-security

Identify WebSocket handshake weaknesses, CSWSH conditions, and message-level vulnerabilities.

241|28|Updated May 20, 2026
One-click install
npx skills add https://github.com/ok-helloworld/vibe-pentest --skill websocket-security-ok-helloworld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: websocket-security
Source: https://github.com/ok-helloworld/vibe-pentest/tree/main/references/pentest_skills/websocket-security
Command: npx skills add https://github.com/ok-helloworld/vibe-pentest --skill websocket-security-ok-helloworld

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps security testers identify WebSocket handshake weaknesses, cross-site WebSocket hijacking paths, and message-level vulnerabilities that can expose sessions and sensitive real-time data.

Core Features & Use Cases

  • WebSocket protocol validation: Review handshake headers like Upgrade, Connection, Sec-WebSocket-Key, and expected 101 responses to confirm protocol correctness.
  • CSWSH risk assessment: Test whether the server properly validates Origin and binds sessions to prevent attacker-controlled pages from using victim credentials.
  • Message and transport hardening checks: Spot common issues such as token leakage in URLs, ws vs wss usage, missing rate limiting, injection in message bodies, and binary deserialization risks.
  • Tooling guidance for testing: Use WS-focused tooling and bridges (e.g., wsrepl and ws-harness concepts) to reproduce and analyze behavior.

Quick Start

Ask the AI to review a WebSocket endpoint for Origin validation gaps, session binding issues, and message injection vectors using the handshake and decision tree in this skill.

Frequently Asked Questions about websocket-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test WebSocket endpoints for cross-site WebSocket hijacking?

To test for cross-site WebSocket hijacking (CSWSH), you verify whether the server properly validates the Origin header and binds sessions to user credentials, preventing attacker-controlled pages from using victim sessions.

What is cross-site WebSocket hijacking and how does Origin validation prevent it?

Cross-site WebSocket hijacking occurs when a server fails to validate the Origin header, allowing malicious pages to initiate authenticated WebSocket connections. Proper Origin validation and session binding prevent this vulnerability.

How do I check WebSocket handshake headers for security vulnerabilities?

You check WebSocket handshake headers by reviewing the Upgrade, Connection, and Sec-WebSocket-Key headers alongside the expected 101 response to confirm protocol correctness and validate session binding behavior.

What are common message injection and transport vulnerabilities in WebSocket APIs?

Common WebSocket transport vulnerabilities include token leakage in URLs, unencrypted ws versus wss usage, missing rate limiting, message body injection, and binary deserialization risks that expose sensitive real-time data.

Can I use this approach to test WebSocket-backed chat and notification systems?

Yes, this approach applies to authorized penetration testing of chat, notifications, and other WebSocket-backed APIs by reviewing browser session behavior and proxy traffic to map discovered routes to message-level risks.

Why do I need to validate the 101 response in WebSocket protocol testing?

Validating the 101 response confirms protocol correctness during the handshake, ensuring the server properly accepts the WebSocket upgrade and allowing you to accurately assess subsequent message and transport security.