The security advisory GHSA-5h3f-885m-v22w describes a vulnerability where existing WebSocket sessions are not terminated after a shared gateway token is rotated. The advisory explicitly points to commit d7c3210cd6f5fdfdc1beff4c9541673e814354d5 as the fix. This commit modifies a single function, fetchWithSsrFGuard, in the file src/infra/net/fetch-guard.ts.
The code change itself relates to DNS pinning and network proxy configurations. It alters the logic to skip DNS pinning for outbound requests when a trusted environment proxy is detected. While this seems unrelated to WebSocket session management at first glance, the connection can be inferred. The process of terminating sessions upon token rotation likely requires the server to make an outbound HTTP request (e.g., to an internal API or to trigger a disconnect). This request is handled by the fetchWithSsrFGuard function.
Before the patch, the function's incorrect DNS pinning logic could cause this critical outbound request to fail in environments that rely on a proxy for name resolution. The failure of this request would lead to the session termination process failing silently, resulting in the observed vulnerability where old sessions persist. The patch corrects this by ensuring the request can be dispatched correctly through the proxy, allowing the session termination logic to complete as expected. Thus, fetchWithSsrFGuard is the function whose flawed behavior is central to this vulnerability.