---
id: "CVE-2026-126343"
page: "https://infrastack.ai/live/CVE-2026-126343"
kind: "vulnerability"
aliases: ["CVE-2026-126343", "GHSA-qv5m-9pm6-hqp3"]
title: "@hono/node-server: Unhandled `ECONNRESET` on the socket during an asynchronous WebSocket upgrade crashes the process"
severity: "medium"
cvss: 5.3
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "@hono/node-server", "fixed": ["2.1.6"], "affected": ">= 2.0.0, < 2.1.6", "ecosystem": "npm"}]
ecosystems: ["npm"]
tags: ["cwe-248", "hono", "node", "package", "self-hosted", "websocket"]
not_affected_if: ["no-async-upgrade-middleware", "no-websocket-support"]
published_at: "2026-11-12T21:32:48+00:00"
first_seen_at: "2026-11-12T21:34:55+00:00"
updated_at: "2026-11-12T21:36:04+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-qv5m-9pm6-hqp3", "first_seen_at": "2026-11-12T21:34:55+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126343", "first_seen_at": "2026-11-12T22:40:37+00:00"}]
exploit_sources: []
---

# @hono/node-server: Unhandled `ECONNRESET` on the socket during an asynchronous WebSocket upgrade crashes the process

Link for people: https://infrastack.ai/live/CVE-2026-126343 (this .md is for agents)

When a WebSocket upgrade request is waiting on async Hono middleware, a client resetting the TCP connection raises an unhandled ECONNRESET error. The Node process terminates, and if the crash is suppressed, memory grows with repeated requests.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- npm:@hono/node-server affected >= 2.0.0, < 2.1.6 fixed 2.1.6

## How to check

- Check the installed version with `npm ls @hono/node-server`
- Look for WebSocket support enabled in `@hono/node-server` and async middleware or handlers on the upgrade path
- Confirm whether a global `uncaughtException` handler is registered in the app

## Fix

- `@hono/node-server` `2.1.6` or later (fixed in `2.1.6` for affected `>= 2.0.0, < 2.1.6`)

## Timeline

- 2026-11-12T21:34:55+00:00 ghsa https://github.com/advisories/GHSA-qv5m-9pm6-hqp3
- 2026-11-12T22:40:37+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-126343

## Documents

- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/honojs/node-server/security-advisories/GHSA-qv5m-9pm6-hqp3
- [advisory] Maintainer's advisory: github.com https://github.com/honojs/node-server/security/advisories/GHSA-qv5m-9pm6-hqp3
- [fix] Patch: github.com https://github.com/honojs/node-server/commit/61cc0267e613e684401f17c27538ba3bf97339a4
- [fix] Release: github.com https://github.com/honojs/node-server/releases/tag/v2.1.6

## From the sources

### Summary

While `@hono/node-server` waits for the Hono application to handle a WebSocket upgrade request, the socket has no error listener. If the client resets the TCP connection during that time, the resulting `ECONNRESET` is emitted as an unhandled `'error'` event and the process terminates.

### Details

The upgrade handler awaits the application before attaching any listener to the socket. When middleware on the upgrade path does asynchronous work, such as an authentication lookup, a connection reset in that window has no handler. If a global `uncaughtException` handler swallows the error, the pending upgrade is never released and its entry is retained for the lifetime of the process.

The fix attaches error and close listeners to the socket before calling the application, releases the pending upgrade when the socket closes, and skips the handshake on a destroyed socket.

### Impact

An unauthenticated client can terminate the server process with a single connection by sending a WebSocket upgrade request and resetting the connection before the application has responded. Where the crash is suppressed, repeated requests grow the heap.

This affects applications that enable WebSocket support in `@hono/node-server` and run asynchronous middleware or handlers on the upgrade path.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
