@hono/node-server is vulnerable to Denial of Service (DoS)
53
Medium Risk
The upgradeWebSocket helper retains each upgrade request's IncomingMessage and a pending waiter promise in an internal map until a successful handshake emits connection or the route guard rejects the request. When ws aborts the handshake because Sec-WebSocket-Key is missing or malformed, no connection event fires, so neither cleanup path runs and the map entry is retained forever. An unauthenticated attacker can flood a public upgrade route with failed pre-handshake requests and gradually exhaust memory until the process becomes unavailable. The fix rejects and deletes the waiter on aborted or failed upgrade paths, including when the underlying socket closes before the handshake completes.
You are affected if you are using a version that falls within the vulnerable range and your application exposes an upgradeWebSocket route.
@hono/node-server is vulnerable to Denial of Service (DoS) in versions 2.0.0 - 2.0.9.
Upgrade the @hono/node-server library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant