unstale

npm / @hono/node-server

@hono/node-server

What changed in @hono/node-server 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-20.

6 breaking9 security4 new APIs and options4 performance31 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@hono/node-server 243 changes

Breaking changes 6

  • Requests with a raw backslash in the path are rejected with 400 Bad Request, preventing path-based access-control bypasses.

    1.19.18, 2.1.6release notesrelease notessecurity advisory

  • Static file serving now serves only GET and HEAD requests.

    2.1.5release notes

  • Rejects request paths that still contain % after decoding, preventing crafted requests from bypassing middleware on static paths. Set allowPercentInPath: true to serve files whose names contain a literal %.

    2.1.3release notessecurity advisory

  • The Vercel adapter was removed; deploy without it on modern Vercel runtimes, or recreate its behavior with getRequestListener.

    2.0.0release notes

  • Support for Node.js v18 has ended; the adapter now requires Node.js v20 or later.

    2.0.0release notes

  • Request handling returns an error object instead of throwing.

    2.0.0release notes

Security 5

  • With allowPercentInPath enabled, serveStatic accepts a second decode only when its result equals the routed path with %25 replaced by %, preventing a middleware bypass while preserving requests for file names containing a literal %.

    2.1.7release notes

  • Socket error and close events are handled while the application runs, and pending upgrades are released when the socket closes, preventing process termination from an unhandled ECONNRESET.

    2.1.6release notessecurity advisory

  • Upgrade request URLs now take their host from the Host header, preventing a request-target beginning with // from replacing it.

    2.1.6release notes

  • Node.js Adapter for Hono: Unauthenticated memory-leak DoS via aborted WebSocket handshake

    2.0.10security advisoryrelease notes

  • Fixed a security issue that could let requests bypass prefix-mounted Serve Static Middleware on Windows.

    2.0.5release notessecurity advisory

New APIs and options 4

  • Added bytes() to the lightweight Request and Response.

    2.1.9release notes

  • Adds middleware for sending Early Hints (HTTP 103).

    2.1.0release notes

  • Adds the --no-git-checks option to pnpm stage publish for skipping Git checks when publishing.

    2.0.8release notes

  • The adapter adds first-class support for WebSockets.

    2.0.0release notes

Performance 4

  • Avoids chaining a promise per chunk while streaming a response.

    2.1.8release notes

  • Request headers are now materialized lazily, improving performance.

    2.1.1release notes

  • Request handling uses a fast path for the PATCH method.

    2.0.11release notes

  • Request handling uses a fast path for QUERY methods.

    2.0.11release notes

Fixes and other changes 24

  • Buffered chunks are drained when recovering a body after disconnect.

    2.1.9release notes

  • Added support for native Request and Response with Symbol.hasInstance.

    2.1.9release notes

  • Forwards duplex to the native request.

    2.1.8release notes

  • Does not send a complete response when the body fails during the early read.

    2.1.8release notes

  • Cancels late HTTP/2 response bodies.

    2.1.8release notes

  • Cancels the response body when the client has already disconnected.

    2.1.8release notes

  • The request signal is aborted when an HTTP/2 client resets the stream.

    2.1.5release notes

  • Hono v5 is now allowed as a peer dependency of @hono/node-server.

    2.1.4release notes

  • Avoids mutating response headers when setting Content-Length.

    2.1.2release notes

  • Fixes a type error in early hints.

    2.1.2release notes

  • Avoids an uncaught error when force-closing a non-standard socket.

    2.1.0release notes

  • Headers are now copied when the response initializer is a foreign Response.

    2.0.12release notes

  • Polyfills the missing ErrorEvent global for WebSocket support.

    2.0.9release notes

  • Corrects edge cases in Range header parsing for static file serving.

    2.0.9release notes

  • Recovers complete request bodies after a client disconnects.

    2.0.9release notes

  • Precompressed files are now served for application/octet-stream.

    2.0.7release notes

  • Cloning a Response with liveheaders now preserves its status and statusText.

    2.0.6release notes

  • Stubs ws types to prevent them from leaking into public types.

    2.0.4release notes

  • Headers mutated after raw Response construction are now preserved.

    2.0.3release notes

  • The Date header no longer uses file birthtime.

    2.0.2release notes

  • serveStatic handles backpressure in the stream fallback.

    2.0.2release notes

  • Hono response headers are now forwarded during WebSocket upgrade.

    2.0.1release notes

  • Response.json() receives improved specification compliance and efficiency.

    2.0.0release notes

  • Response.redirect() receives improved specification compliance and efficiency.

    2.0.0release notes

@hono/node-server 111 changes

Security 4

  • This option allows serving files whose names contain a literal %, with a hardened check against double-decoding; the README notes a caveat about route-level access control.

    1.19.19release notes

  • After routing, serveStatic skips request paths that still contain %, preventing a second decode from serving a different path and bypassing middleware.

    1.19.19release notes

  • @hono/node-server: Middleware bypass via repeated slashes in serveStatic

    1.19.13security advisoryrelease notes

  • @hono/node-server has authorization bypass for protected static paths via encoded slashes in Serve Static Middleware

    1.19.10security advisoryrelease notes

Fixes and other changes 7

  • Added custom inspect to lightweight Request and Response to prevent TypeError when using console.log.

    1.19.14release notes

  • Fixes request draining for early 413 responses.

    1.19.12release notes

  • The fast path no longer overwrites Content-Length when it already exists.

    1.19.11release notes

  • The Node server no longer overwrites global.fetch.

    1.19.9release notes

  • serveStatic now uses Readable.toWeb.

    1.19.8release notes

  • Fixes incorrect content-length after following a symlink.

    1.19.7release notes

  • Fixed the timing of onFound in serve-static.

    1.19.6release notes