The vulnerability is a Cross-Site WebSocket Hijacking (CSWSH) in Dozzle, affecting the /exec and /attach endpoints. The root cause is an insecure configuration of the WebSocket upgrader in internal/web/terminal.go. The CheckOrigin function was set to always return true, effectively disabling same-origin policy and allowing WebSocket connections from any origin. This, combined with the SameSite=Lax setting for the JWT authentication cookie, allowed an attacker to craft a malicious webpage. When a logged-in Dozzle user visits this page, the browser automatically includes the authentication cookie in the cross-origin WebSocket request. This allows the attacker's site to hijack the authenticated session and gain shell access to any container the victim is authorized to access. The vulnerable functions are web.handler.attach and web.handler.exec, as they are the handlers for the /attach and /exec endpoints and utilize the misconfigured WebSocket upgrader. The fix was to remove the insecure CheckOrigin override, restoring the default behavior of the gorilla/websocket library, which rejects cross-origin requests.