Repository navigation
fix(deps): update dependency @hono/node-server to v2.1.6 [security] - #8592
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/npm-hono-node-server-vulnerability
branch
from
August 26, 2026 15:08
bfc4b93 to
92a6787
Compare
renovate
Bot
force-pushed
the
renovate/npm-hono-node-server-vulnerability
branch
2 times, most recently
from
September 7, 2026 16:40
fb7b1f1 to
d9dac8e
Compare
renovate
Bot
force-pushed
the
renovate/npm-hono-node-server-vulnerability
branch
from
October 16, 2026 10:52
d9dac8e to
6a4df7d
Compare
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
renovate
Bot
force-pushed
the
renovate/npm-hono-node-server-vulnerability
branch
2 times, most recently
from
October 24, 2026 13:22
d9d85b6 to
0c4058d
Compare
renovate
Bot
force-pushed
the
renovate/npm-hono-node-server-vulnerability
branch
from
November 1, 2026 05:41
0c4058d to
8486043
Compare
renovate
Bot
force-pushed
the
renovate/npm-hono-node-server-vulnerability
branch
3 times, most recently
from
November 11, 2026 15:05
ed48f70 to
2d054c8
Compare
renovate
Bot
force-pushed
the
renovate/npm-hono-node-server-vulnerability
branch
from
November 12, 2026 23:40
2d054c8 to
1bb36d8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
1.19.10→2.1.62.0.4→2.1.6@hono/node-server: Middleware bypass via repeated slashes in serveStatic
CVE-2026-39406 / GHSA-92pp-h63x-v22m
More information
Details
Summary
A path handling inconsistency in
serveStaticallows protected static files to be accessed by using repeated slashes (//) in the request path.When route-based middleware (e.g.,
/admin/*) is used for authorization, the router may not match paths containing repeated slashes, whileserveStaticresolves them as normalized paths. This can lead to a middleware bypass.Details
The routing layer and
serveStatichandle repeated slashes differently.For example:
/admin/secret.txt=> matches/admin/*//admin/secret.txt=> may not match/admin/*This inconsistency allows a request such as:
to bypass middleware registered on
/admin/*and access protected files.Impact
An attacker can access static files that are intended to be protected by route-based middleware by using repeated slashes in the request path.
This can lead to unauthorized access to sensitive files under the static root.
This issue affects applications that rely on
serveStatictogether with route-based middleware for access control.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Node.js Adapter for Hono: Unauthenticated memory-leak DoS via aborted WebSocket handshake
CVE-2026-73565 / GHSA-9mqv-5hh9-4cgg
More information
Details
Summary
A WebSocket upgrade request to an
upgradeWebSocketroute with a missing or malformedSec-WebSocket-Keyheader leaks memory permanently. The request'sIncomingMessageis retained in an internal map and a pending promise is never settled, even though no connection is established. Since the route is reachable pre-handshake without authentication, an unauthenticated attacker can flood it to gradually exhaust memory.Details
The built-in WebSocket helper cleans up its internal map only on a successful handshake or when the route guard rejects the request. When
wsaborts the handshake becauseSec-WebSocket-Keyis missing or malformed, noconnectionevent is emitted, so neither cleanup path runs and the entry is retained forever. A present-but-malformed key leaks identically, so a proxy that only checks for the header's presence does not mitigate it.Impact
An unauthenticated attacker can flood any public
upgradeWebSocketroute with malformed-key upgrade requests, causing unbounded memory growth and eventual loss of availability. No confidentiality or integrity impact.Reported by @TarPeg007.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Node.js Adapter for Hono: Path traversal in
serve-staticon Windows via encoded backslash (%5C)GHSA-frvp-7c67-39w9
More information
Details
The same as the
honocore Path traversal inserve-staticon Windows via encoded backslash (%5C).Summary
On Windows hosts, an encoded backslash (
%5C) in the request path decodes to\, which the Windows path resolver treats as a separator.serve-staticthen resolves a single URL segment such asadmin\secret.txtinto a nested file under the root and serves it, letting an attacker read static files meant to be protected behind prefix-mounted middleware. Directory escape (..) remains blocked.Details
The router splits paths only on
/, so/admin%5Csecret.txtis one segment and middleware on/admin/*does not run. Theserve-staticguard rejects./..and consecutive separators but lets a lone\through; on Windows the file resolver re-splits it into the protected subtree.This affects Windows hosts serving static files via the Node, Bun, or Deno adapters that guard a static subtree with prefix-mounted middleware.
Impact
An unauthenticated attacker can read static files under a middleware-guarded prefix on Windows hosts. The read stays within the configured root; escape outside the root is not possible.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
@hono/node-server:
serveStaticdecodes the request path a second time, leading to bypass of middleware on static pathsCVE-2026-118663 / GHSA-rmxm-3fg6-px4f
More information
Details
Summary
serveStaticdecodes the request path a second time after Hono has already decoded it for routing. A crafted request can be routed as one path and served as another, so middleware mounted on a static prefix does not run for a file under that prefix.Details
Hono decodes the request path once before routing.
serveStaticdecoded it again before resolving the file. With a malformed percent-encoded sequence, the first decode leaves part of the path encoded, the router matches the encoded form, and the second decode resolves the real directory. The file is still resolved inside the configured root; this is not a traversal outside it.Impact
An unauthenticated attacker may reach static files without the middleware on their prefix running, for example an authentication check. This affects applications that mount middleware on part of the directory served by
serveStatic. Applications that serve only public files are not affected.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
@hono/node-server: Backslash in the request path is parsed as a path separator, bypassing path-based access control at a reverse proxy
CVE-2026-126210 / GHSA-jpvv-r467-5p4w
More information
Details
Summary
@hono/node-serverpasses the raw request-target to the WHATWG URL parser, which treats a backslash in the path as/and then resolves..segments. A request for/admin\secretor/public\..\admin/secretreaches the application as/admin/secret. A reverse proxy that follows RFC 3986 forwards the backslash unchanged and applies its path-based rules to the original path, so the request reaches a route the proxy is meant to block.Details
A raw backslash is not allowed in a request-target (RFC 3986, RFC 9112 Section 3.2.1), and RFC 9112 Section 3.2 says a recipient should reject such a request rather than correct it. Proxies such as nginx on Linux, HAProxy and Envoy keep the backslash as an ordinary character, so they and the application see different paths.
The fix responds with
400 Bad Requestto a request whose path contains a raw backslash, for HTTP/1.1, HTTP/2, absolute-form request-targets and WebSocket upgrades. A percent-encoded backslash and a backslash in the query string are still accepted.Impact
An unauthenticated client can reach a route that a reverse proxy, load balancer or WAF in front of the application blocks by path.
This affects applications served by
@hono/node-serverbehind a front component that makes path-based decisions and forwards a backslash unchanged. Access control inside the Hono application, such as middleware on/admin/*, runs on the rewritten path and is not affected.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
@hono/node-server: Unhandled
ECONNRESETon the socket during an asynchronous WebSocket upgrade crashes the processCVE-2026-126343 / GHSA-qv5m-9pm6-hqp3
More information
Details
Summary
While
@hono/node-serverwaits 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 resultingECONNRESETis 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
uncaughtExceptionhandler 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-serverand run asynchronous middleware or handlers on the upgrade path.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
honojs/node-server (@hono/node-server)
v2.1.6Compare Source
Security fixes
This release includes fixes for the following security issues:
Backslash in the request path is parsed as a path separator, bypassing path-based access control at a reverse proxy
Affects: all requests. The raw request-target was passed to the WHATWG URL parser, which treats a backslash in the path as
/and resolves..segments, so/admin\secretreached the application as/admin/secret. A reverse proxy that forwards the backslash unchanged applied its path-based rules to the original path. GHSA-jpvv-r467-5p4wA request whose path contains a raw backslash is now rejected with
400 Bad Request, for HTTP/1.1, HTTP/2 and WebSocket upgrades. A percent-encoded backslash (%5C) and a backslash in the query string are still accepted.WebSocket upgrade request-target starting with
//replaces the host inc.req.url, bypassingOriginchecksAffects:
upgradeWebSocket. The URL of an upgrade request was built by resolving the request-target against theHostheader, so a request-target such as//attacker.example/wsset the host ofc.req.urlto a client-chosen value while routing still saw/ws. An application that comparedOriginwith the origin ofc.req.urlcould be bypassed by a page on another site. GHSA-7v5p-43qr-wch5The host of upgrade requests now comes from the
Hostheader, as for ordinary requests.Unhandled
ECONNRESETon the socket during an asynchronous WebSocket upgrade crashes the processAffects:
upgradeWebSocket. While the application handled an upgrade request, the socket had no error listener. A client that reset the connection during asynchronous middleware caused an unhandled'error'event and terminated the process. GHSA-qv5m-9pm6-hqp3Error and close events on the socket are now handled while the application runs, and a pending upgrade is released when the socket closes.
The backslash fix also ships in
@hono/node-serverv1.19.18. Users ofupgradeWebSocketare encouraged to upgrade to this version.v2.1.5Compare Source
What's Changed
New Contributors
Full Changelog: honojs/node-server@v2.1.4...v2.1.5
v2.1.4Compare Source
What's Changed
Full Changelog: honojs/node-server@v2.1.3...v2.1.4
v2.1.3Compare Source
Security fixes
serveStaticdecodes the request path a second time, leading to bypass of middleware on static pathsAffects:
@hono/node-server/serve-static. FixesserveStaticdecoding an already-decoded path, where a crafted request could be routed as one path and served as another, skipping middleware mounted on a static prefix. GHSA-rmxm-3fg6-px4fserveStaticnow rejects request paths that still contain%after decoding. To serve files whose names contain a literal%, setallowPercentInPath: true.The same fix ships in
honov4.13.11.v2.1.2Compare Source
What's Changed
Full Changelog: honojs/node-server@v2.1.1...v2.1.2
v2.1.1Compare Source
What's Changed
Full Changelog: honojs/node-server@v2.1.0...v2.1.1
v2.1.0Compare Source
What's Changed
New Contributors
Full Changelog: honojs/node-server@v2.0.12...v2.1.0
v2.0.12Compare Source
What's Changed
Full Changelog: honojs/node-server@v2.0.11...v2.0.12
v2.0.11Compare Source
What's Changed
Full Changelog: honojs/node-server@v2.0.10...v2.0.11
v2.0.10Compare Source
Security fixes
This release includes a fix for the following security issue:
Unauthenticated memory-leak DoS via aborted WebSocket handshake
Affects:
upgradeWebSocket. A WebSocket upgrade request with a missing or malformedSec-WebSocket-Keyheader leaked the request'sIncomingMessageand left a promise pending, even though no connection was established. Since the route is reachable pre-handshake without authentication, an attacker could flood it to gradually exhaust memory. GHSA-9mqv-5hh9-4cggUsers of
upgradeWebSocketare encouraged to upgrade to this version.v2.0.9Compare Source
What's Changed
New Contributors
Full Changelog: honojs/node-server@v2.0.8...v2.0.9
v2.0.8Compare Source
What's Changed
--no-git-checksoption forpnpm stage publishby @yusukebe in #369Full Changelog: honojs/node-server@v2.0.7...v2.0.8
v2.0.6Compare Source
What's Changed
npby @yusukebe in #361Full Changelog: honojs/node-server@v2.0.5...v2.0.6
v2.0.5Compare Source
Security Fix
Fixed a security issue in Serve Static Middleware where prefix-mounted middleware could be bypassed on Windows. This only affects applications running on Windows that use Serve Static Middleware. Affected users are encouraged to upgrade to this version.
See GHSA-frvp-7c67-39w9 for details.
v2.0.4Compare Source
What's Changed
Full Changelog: honojs/node-server@v2.0.3...v2.0.4
v2.0.3Compare Source
What's Changed
ServeStaticOptionscomment with the current spec by @kakkokari-gtyih in #356New Contributors
Full Changelog: honojs/node-server@v2.0.2...v2.0.3
v2.0.2Compare Source
What's Changed
Full Changelog: honojs/node-server@v2.0.1...v2.0.2
v2.0.1Compare Source
What's Changed
New Contributors
Full Changelog: honojs/node-server@v2.0.0...v2.0.1
v2.0.0Compare Source
Now, we release the second major version of the Hono Node.js adapter 🎉 🎉 🎉
The Hono Node.js adapter is now up to 2.3x faster
v2 of the Hono Node.js adapter reaches up to 2.3x the throughput of v1 — that's the peak number, measured on the body-parsing scenario of
bun-http-framework-benchmark. The other scenarios (Ping, Query) get a smaller but real boost too.Install or upgrade with:
v2
The Node.js adapter is going through a major version bump to v2. That said, the public API stays the same — the headline of this release is the large performance improvement described above.
What does the Node.js adapter do?
A quick refresher on what the Node.js adapter actually does — it exists so that Hono applications can run on Node.js. Hono is built on the Web Standards APIs, but you cannot serve those directly from Node.js. The adapter bridges the Web Standards APIs and the Node.js APIs, which is what lets a Hono app — and more generally a Web-Standards-style app — run on top of Node.js.
If you write the following code and run
node ./index.js, a server starts up onlocalhost:3000. And it really is plain Node.js underneath.The early performance story
The very first implementation of the Node.js adapter looked roughly like this in pseudocode:
So the flow was:
IncomingMessageRequestobject and handed to the appResponsereturned by the app is written back to the outgoingServerResponseIn diagram form:
This is, frankly, inefficient. So whenever Hono went head-to-head with other Node.js frameworks we kept losing — all we could do was shrug and say "well, it's slow on Node.js."
Introducing LightweightRequest / LightweightResponse
The huge step forward that fixed this was a legendary PR from @usualoma:
#95
It made things up to 2.7x faster.
I previously wrote about this in detail in this post:
https://zenn.dev/yusukebe/articles/7ac501716ae1f7?locale=en
In short, the trick is wonderfully simple. It just follows the golden rule of performance tuning: don't do work you don't have to do. Lightweight versions of
RequestandResponseare constructed and used first — and that path is fast. Only when something actually needs the contents of theRequest, e.g. when you callreq.json(), does a realnew Request()get instantiated under the hood and used from then on. The result is fast, and behavior stays correct.…but body parsing was still slow
"Fast" here was for a very simple "Hello World" benchmark — a GET that just returns text.
There are many ways to benchmark, but the one we tend to reach for is this:
https://github.com/SaltyAom/bun-http-framework-benchmark
It tests three scenarios: Ping, Query, and Body. Let's pit Hono against the major Node.js frameworks:
As you can see, the Body case is very slow. The handler being measured is essentially this:
c.req.json()is the slow part. The reason is well understood: inside the Node.js adapter, whenjson()is called the LightweightRequest path can't be used, so a realnew Request()ends up being constructed.perf: optimize request body reading
The 2.3x figure above comes from one PR specifically — PR #301 by @mgcrea:
The PR bundles a few changes, but the key one is "optimize request body reading". Quoting from the PR description:
In other words, in the
json()case above, we no longer convert into aRequestat all — we read the body straight off the Node.js APIs. A classic fast path. That alone gives a large jump in body-parsing throughput.The same PR also includes two other tuning improvements:
URLobject except in edge casesbuildOutgoingHttpHeadersoptimization — skip theset-cookieheader comparison when there are no cookiesv2 ships several other performance PRs as well —
newHeadersFromIncomingand signal fast-paths,Responsefast-paths andresponseViaCacheimprovements, method-key caching, a regex-basedbuildUrlrewrite, and more (see the full list below). They all add up, but #301 is by far the largest single contributor, which is why it gets the spotlight here.v2 performance
Now let's measure the final v2 build.
First, comparing against the v1 Node.js adapter.
devhere is v2. Body improves by 2.3x, and the other scenarios get faster too:Next, the same comparison against other frameworks. With the Body score jumping, Hono passes Koa and Fastify and takes first place:
Breaking changes
There are two breaking changes in v2.
Dropped support for Node.js v18
Node.js v18 reached end-of-life, so v2 requires Node.js v20 or later.
Removed the Vercel adapter
The Vercel adapter (
@hono/node-server/vercel) has been removed. It is no longer needed for Vercel's modern runtimes, so the recommendation is to deploy without it.If you still need the previous behavior, the old adapter was a one-liner on top of
getRequestListenerand you can write the same thing in your own project:Then use it the same way you used
handlefrom@hono/node-server/vercelbefore.All changes
A full list of what landed in PR #316.
Performance
buildOutgoingHttpHeadersfor the common case (#301) by @mgcrea:as safe host (#320) by @yusukebenewHeadersFromIncomingand signal fast-path (#332) by @GavinMeierSonosResponsefast-paths andresponseViaCacheimprovements (#333) by @GavinMeierSonosUint8Arraylookup tables with regex inbuildUrl(#345) by @usualomaFeatures
Breaking changes
Fixes & refactors
new URL()should be used (#310) by @usualomaRequestobject (#311) by @usualomaBlob/ReadableStreamcacheable responses (#342) by @usualomaResponse.json()andResponse.redirect()spec compliance and efficiency (#343) by @usualomaBuild & tooling
type: moduletopackage.json(#336) by @yusukebeWrap-up
So that's v2 of the Node.js adapter — significantly faster, with the same API. Just upgrading should give you a real performance boost. No more "Hono is slow on Node.js" excuses. Please use Hono — fast not only on Cloudflare, Bun, and Deno, but now also on Node.js.
v1.19.19Compare Source
Security fixes
This release backports the
serveStaticdouble-decode fixes from the 2.x line to 1.x.serveStaticdecodes the request path a second time, leading to bypass of middleware on static pathsAffects:
serveStatic. The request path was decoded again after Hono had already decoded it for routing, so a crafted request could be routed as one path and served as another, and middleware mounted on a static prefix did not run for a file under that prefix. Fixed in 2.1.3 for the 2.x line; this release brings the fix to 1.x. GHSA-rmxm-3fg6-px4fserveStaticnow skips request paths that still contain%after routing. SetallowPercentInPath: trueto serve files whose names contain a literal%; see the README for the caveat about route-level access control.serveStaticwithallowPercentInPathdecodes the request path a second time, leading to bypass of middleware on static pathsAffects:
serveStaticwithallowPercentInPath: true. The 1.x line never shipped this option, so no released 1.x version is affected. The backport includes the hardened check from 2.1.7 so that the option arrives in 1.x in its fixed form. GHSA-fj57-4f93-cfw6The 1.x line receives security fixes only. Install with
npm i @hono/node-server@latest-1.Full Changelog: honojs/node-server@v1.19.18...v1.19.19
v1.19.18Compare Source
Security fixes
This release includes a fix for the following security issue:
Backslash in the request path is parsed as a path separator, bypassing path-based access control at a reverse proxy
Affects: all requests. The raw request-target was passed to the WHATWG URL parser, which treats a backslash in the path as
/and resolves..segments, so/admin\secretreached the application as/admin/secret. A reverse proxy that forwards the backslash unchanged applied its path-based rules to the original path. GHSA-jpvv-r467-5p4wA request whose path contains a raw backslash is now rejected with
400 Bad Request. A percent-encoded backslash (%5C) and a backslash in the query string are still accepted.The same fix, together with two WebSocket fixes, ships in
@hono/node-serverv2.1.6. Users on 1.x who can upgrade to 2.x are encouraged to do so.v1.19.17Compare Source
v1.19.15Compare Source
v1.19.14Compare Source
What's Changed
Full Changelog: honojs/node-server@v1.19.13...v1.19.14
v1.19.13Compare Source
Security Fix
Fixed an issue in Serve Static Middleware where inconsistent handling of repeated slashes (
//) between the router and static file resolution could allow middleware to be bypassed. Users of Serve Static Middleware are encouraged to upgrade to this version.See GHSA-92pp-h63x-v22m for details.
v1.19.12[Comp
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.