Summary
Signal K Server's WebSocket login path lacks rate limiting, allowing attackers to bypass protections applied to the HTTP login endpoints.
By sending repeated login messages over an existing WebSocket connection, an attacker can perform high-speed password guessing attempts constrained only by bcrypt performance, significantly increasing the risk of credential compromise.
Affected context
This vulnerability occurs in deployments of Signal K Server where:
- Users authenticate using credentials (username/password).
- HTTP login endpoints are protected by express-rate-limit, but WebSocket connections are also accepted.
- The WebSocket login flow invokes the authentication strategy directly without reusing or enforcing the same rate-limiting controls.
In such environments, any system that exposes the WebSocket interface over a network can be susceptible to automated password guessing.
Exploit preconditions
- Attack surface: Network-accessible Signal K Server instance with WebSocket support enabled.
- Required access: Ability to establish a WebSocket connection to the server (no prior authentication required).
- Trigger point: Sending
{ login: { username, password } }messages repeatedly over an active WebSocket connection. - Why exploitation is possible: The WebSocket login path calls
app.securityStrategy.login()directly without invoking the same rate-limiting middleware used for HTTP endpoints, eliminating any enforced limit on failed login attempts.
Why this happens
The root cause lies in inconsistent application of authentication controls across different transport paths.
While HTTP login endpoints are wrapped with express-rate-limit middleware, the WebSocket login logic bypasses this layer and interacts directly with the authentication strategy. This design introduces a gap where the same security expectation—limiting repeated failed login attempts—is not enforced uniformly. Conceptually, this maps to CWE-307: Improper Restriction of Excessive Authentication Attempts, where an authentication mechanism fails to throttle or block repeated invalid login attempts over a particular channel.
Potential impact
- An attacker may perform high-speed online brute-force attacks against user credentials.
- Weak or reused passwords could be guessed and compromised more easily.
- Unauthorized access to boat systems, telemetry, or control interfaces integrated with Signal K Server could occur.
- Compromised accounts could be used as a foothold for further configuration tampering or data manipulation within the vessel's network.
General mitigation guidance
Effective mitigation focuses on applying consistent authentication throttling and hardening login workflows:
- Ensure rate limiting, lockout policies, or throttling are enforced uniformly across all authentication entry points, including WebSocket and API-specific routes.
- Design authentication logic so that rate limiting is a core cross-cutting concern, not tied to a specific transport or middleware stack.
- Encourage or enforce strong password policies, including length and complexity requirements, and consider supporting multi-factor authentication where appropriate for critical operations.
- Reduce the impact of credential compromise by limiting the privileges of authenticated sessions and segregating high-value actions behind additional checks or approvals.
- Consider network-level protections such as IP-based rate limits or segmentation to reduce anonymous access to the authentication endpoints from untrusted networks.
How teams detect issues like this
Detection usually involves both code-centric and behavioral approaches:
- During code review, verify that all authentication flows (HTTP, WebSocket, RPC, APIs) reuse common rate-limiting and lockout mechanisms, rather than duplicating custom login paths.
- Use static or configuration analysis to locate endpoints or message handlers that call authentication routines directly without passing through shared security middleware.
- Monitor authentication logs and metrics for unusual patterns, such as high volumes of failed logins from a single IP, connection, or user account over WebSocket channels.
- Implement centralized security policies or gateways that can enforce rate limits independent of application transport specifics, providing a backstop if application-layer controls are missed.

