▶ Praison AIpraisonai-bot gateway · ws framespraisonai-bot < 0.2.0praisonai-bot 0.2.0evil.examplea tab you have openyour browserTCP peer 127.0.0.1praisonai-bot gateway127.0.0.1:8765, no tokennew WebSocket( "ws://127.0.0.1:8765/ws")GET /ws Upgrade: websocketOrigin: https://evil.examplecheck_origin(origin, [], "127.0.0.1")True: loopback bind, Origin never readFalse: Origin is not this machine101 Switching Protocols · socket openthe page talks to chat, tools and approvals{"type": "hello_error", "code": "origin_not_allowed", "message": "Origin not allowed", "next_step": "do_not_retry"}close 4003gateway logINFO Gateway started on ws://127.0.0.1:8765WARN WebSocket connection rejected: origin 'https://evil.example' not in allowed list
The praisonai-bot gateway on 127.0.0.1:8765 with no token set. A page on another site opens a WebSocket to it through your browser, so the connection comes from 127.0.0.1. Before 4.8.0 check_origin approved any Origin on a loopback bind and the socket opened. In 4.8.0 it requires an Origin on this machine: the gateway sends a hello_error frame, closes with 4003 and logs the rejection.