Skip to content

fix: add Origin check to WebSocket handler to prevent CSWSH#1364

Merged
richard-to merged 1 commit intomainfrom
claude/fix-websocket-origin-check-4qG5h
Mar 15, 2026
Merged

fix: add Origin check to WebSocket handler to prevent CSWSH#1364
richard-to merged 1 commit intomainfrom
claude/fix-websocket-origin-check-4qG5h

Conversation

@richard-to
Copy link
Collaborator

Browsers do not enforce same-origin policy for WebSocket upgrades, so a malicious page on a different origin could initiate a WebSocket connection to the Mesop server (cross-site WebSocket hijacking). This mirrors the existing CSRF check on the SSE endpoint.

https://claude.ai/code/session_01JXV99vPFFRVeX3cst7SLTw

Browsers do not enforce same-origin policy for WebSocket upgrades, so a
malicious page on a different origin could initiate a WebSocket connection
to the Mesop server (cross-site WebSocket hijacking). This mirrors the
existing CSRF check on the SSE endpoint.

https://claude.ai/code/session_01JXV99vPFFRVeX3cst7SLTw
@richard-to richard-to merged commit 7763fdf into main Mar 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants