Browser & protocol
WebSocket Security
WebSocket security depends on handshake authentication, browser Origin handling and authorization of individual messages. A successful protocol upgrade does not prove access to protected data or actions. WebSockets do not use the normal fetch CORS response-sharing protocol.
- 30 payloads
- 1 file
- README on GitHub
Payloads are read from main at 35c1f2b (committed 22 Nov 2026). Project version 1.0.2.
These payloads are for authorized testing only: systems you own, authorized bug bounty programs, or controlled lab environments. Unauthorized testing is illegal.
Payload files
Use the arrow keys to move between payloads. Press Enter or C to copy the focused payload.
websocket-security-payloads.txt
30 payloads · 3.2 KBLoading payloads for WebSocket Security…
Common Attack Vectors#
- Cross-site WebSocket hijacking with ambient cookies
- Missing handshake and per-message authentication
- Room, channel and subscription authorization
- Session expiry and logout on long-lived connections
- Subprotocol negotiation and message schema validation
- Replay, ordering and binary/text frame differences
Testing Approach#
Use a local echo/chat fixture, a separate browser origin and two controlled users. Start with the read-only whoami or ping operation, then test private-channel boundaries. Verify cookie inclusion in the browser before claiming cross-site hijacking. Browser JavaScript cannot set an arbitrary Cookie, Authorization or Origin header for a WebSocket connection; proxy header mutations are separate controls.
Send only the small messages provided. For lifecycle tests, leave the socket open while expiring or revoking the session, then inspect protected messages. For binary validation, send a small UTF-8 encoded message as a binary frame; do not send oversized or malformed transport frames outside a dedicated protocol lab.
References#
Responsible Use
All content in this reference is for authorized security testing only. Use only on systems you own or have explicit written permission to test.
- Systems and applications you own
- Authorized penetration testing engagements
- Bug bounty programs with defined scope
- Educational lab environments (DVWA, WebGoat, HackTheBox)