Workspace-Server SSRF Guard Bypass: Unpatched isSafeURL Flaw Exposes Internal Services via WebSocket Protocols
A critical SSRF (Server-Side Request Forgery) bypass vulnerability has been identified in workspace-server's URL validation logic, leaving internal services exposed to potential WebSocket-based attacks. The flaw, catalogued as a P0 severity issue, resides in the isSafeURL function within workspace-server/internal/handlers/ssrf.go. The function currently fails to block ws:// and wss:// URL schemes, allowing attackers to bypass the SSRF guard by initiating WebSocket upgrades to internal infrastructure.
The vulnerability stems from an incomplete allowlist in isSafeURL. While the function correctly blocks http:// and https:// requests to internal or restricted endpoints, it does not apply the same restrictions to WebSocket protocols. This means an attacker who can control or influence URL parameters processed by the affected function could potentially trigger connections to internal services—databases, internal APIs, administrative panels, or microservices—that should be unreachable from external requests. The attack vector is particularly concerning because WebSocket upgrades occur over the same HTTP handshake mechanism that SSRF guards typically monitor.
Security researchers reviewing the issue have recommended an immediate fix: adding ws:// and wss:// to the list of blocked URL schemes in isSafeURL, mirroring the existing restrictions applied to http:// and https://. As of the current disclosure, the vulnerability has not been addressed in any open pull request, and no patch or mitigation has been publicly released. Organizations running affected versions of workspace-server should monitor the upstream repository for patches and consider temporary compensating controls—such as network segmentation or additional proxy-layer filtering—until an official fix is available.