CVE-2026-126343: @hono/node-server: Unhandled `ECONNRESET` on the socket during an asynchronous WebSocket upgrade crashes the process
Medium CVSS 5.3
- OSV id
- GHSA-qv5m-9pm6-hqp3
- Also known as
- CVE-2026-126343
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| @hono/node-server npm |
>= 2.0.0, < 2.1.6 | 2.1.6 |
Versions we track that it affects: @hono/node-server 2.1.1
How to fix it
Upgrade @hono/node-server to 2.1.6 or later.
npm install @hono/node-server@2.1.6
# if it is an indirect dependency: npm update @hono/node-server (or npm audit fix)
- If it is an indirect dependency, upgrade the package that depends on it, or force the version with "overrides" (npm), "resolutions" (Yarn) or "pnpm.overrides" (pnpm) in package.json.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
Not sure whether your project uses an affected version? Check your lockfile below for free.
Details
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.
References
- GHSA-qv5m-9pm6-hqp3 on OSV.dev
- Web: https://github.com/honojs/node-server/security/advisories/GHSA-qv5m-9pm6-hqp3
- Web: https://github.com/honojs/node-server/commit/61cc0267e613e684401f17c27538ba3bf97339a4
- Package: https://github.com/honojs/node-server
- Web: https://github.com/honojs/node-server/releases/tag/v2.1.6
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: GitHub Advisory Database via OSV.dev (CC-BY 4.0). Severity comes from the advisory's own rating when it has one, else from its CVSS score.