# Cross-site WebSocket hijacking

A page on another origin opens an authenticated socket and reads or performs protected operations.

**Candidate CWE:** [CWE-346](https://cwe.mitre.org/data/definitions/346.html) · [CWE-352](https://cwe.mitre.org/data/definitions/352.html)

## Test hypothesis

From a controlled researcher page, open the observed socket using the actual browser session behavior. Send one harmless application-protocol message and compare a logged-out browser control.

## Evidence required

The other-origin page receives private controlled data or commits a protected action using ambient credentials. Record cookie policy, Origin, handshake, and message exchange.

## Rule out false positives

Arbitrary Origin accepted in a nonbrowser client, missing cookies, or a socket that permits only public data is insufficient.

## Playbook and command references

- [REST, GraphQL, gRPC, WebSocket, and SSE permission parity](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/api-protocols.html) — Carry the same permission invariant across protocols, nested fields, streams, and alternate API versions.
- [Browser execution, cross-origin reads, and forged actions](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/browser-trust.html) — Use real browser behavior to distinguish XSS, CSRF, CORS, and messaging failures from header-only leads.

[Find the associated command snippets](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/commands.html?q=REST%2C%20GraphQL%2C%20gRPC%2C%20WebSocket%2C%20and%20SSE%20permission%20parity)

## Referenced by these target playbooks

[Web & API](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/web-api.html) · [OSS & self-hosted](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/oss.html) · [Mobile](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/mobile.html) · [Desktop & extensions](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/desktop.html)

## Report checklist

- [ ] Capture the affected version, configuration, identities, and object ownership.
- [ ] Preserve a valid baseline and a negative control.
- [ ] Reproduce the forbidden data access, action, or state change on controlled fixtures.
- [ ] Explain the intended security rule and why the observed behavior violates it.
- [ ] State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.

## Conditional ATT&CK mapping

No direct ATT&CK mapping selected. Record the weakness and demonstrated impact without forcing an adversary-behavior classification. See the [mapping guide](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/attack.html).

## Primary references

- [PortSwigger cross-site WebSocket hijacking](https://portswigger.net/web-security/websockets/cross-site-websocket-hijacking)

[Back to the complete vulnerability catalog](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/vulnerabilities.html)
