If you run Hono on Node.js, the @hono/node-server adapter has had a busy few weeks. Between 2 and 12 November 2026 it shipped four security fixes and a batch of streaming fixes across the 1.x and 2.x lines. One of them matters most if you sit Hono behind nginx, HAProxy, Envoy or a cloud load balancer: a raw backslash in the URL could slip past your proxy’s path rules. This guide explains each advisory in plain English, shows how to check your version, and gives you tests to confirm the fixes.
The short version
- On 2.x: upgrade to 2.1.7 or later. 2.1.8 (12 November) adds streaming and disconnect fixes on top, so it’s the sensible target.
- On 1.x: upgrade to 1.19.19, the latest security-only 1.x release. The maintainers encourage moving to 2.x if you can.
# 2.x
npm install @hono/node-server@latest
# 1.x (security fixes only)
npm install @hono/node-server@latest-1
Check what you actually have, including transitive installs:
npm ls @hono/node-server
Advisory 1: backslash bypasses proxy path rules
GHSA-jpvv-r467-5p4w affects 2.x before 2.1.6 and 1.x before 1.19.18.
The adapter passed the raw request target to the WHATWG URL parser. That parser treats a backslash in the path as / and resolves .. segments. So a request for /admin\secret reached your app as /admin/secret. Meanwhile, a reverse proxy that forwards the backslash unchanged applied its rules to the original path, which doesn’t start with /admin/.
Picture an nginx rule that blocks the admin area at the edge:
location /admin/ {
deny all;
}
location / {
proxy_pass http://127.0.0.1:3000;
}
A request to /public\..\admin/secret doesn’t match /admin/ in nginx, so it’s forwarded. Before the fix, Hono then saw /admin/secret. Access control done inside the app, such as middleware on /admin/*, was not affected, because the app saw the resolved path consistently.
The fix (v2.1.6, v1.19.18): any request whose path contains a raw backslash is 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.
Advisory 2: WebSocket host spoofing with //
GHSA-7v5p-43qr-wch5 affects upgradeWebSocket in 2.x before 2.1.6. The URL for an upgrade request was built by resolving the request target against the Host header, so a target like //attacker.example/ws set the host of c.req.url to a client-chosen value while routing still saw /ws. Apps that compared the Origin header with the origin of c.req.url could be bypassed by a page on another site. After the fix, the host comes from the Host header, as for normal requests.
A safer pattern, whatever version you run, is to compare Origin against an explicit allow-list:
import { Hono } from 'hono';
const app = new Hono();
const ALLOWED_ORIGINS = new Set(['https://app.example.com']);
app.use('/ws', async (c, next) => {
const origin = c.req.header('origin');
if (!origin || !ALLOWED_ORIGINS.has(origin)) {
return c.text('Forbidden', 403);
}
await next();
});
Advisory 3: ECONNRESET crash during WebSocket upgrade
GHSA-qv5m-9pm6-hqp3, also fixed in 2.1.6: while your app handled an upgrade request in asynchronous middleware, the socket had no error listener. A client that reset the connection at that moment caused an unhandled 'error' event and killed the process. That’s an easy denial-of-service. Now error and close events are handled while the app runs, and a pending upgrade is released when the socket closes.
Advisory 4: double decoding with allowPercentInPath
GHSA-fj57-4f93-cfw6, fixed in v2.1.7 on 11 November, affects only apps that use serveStatic with the opt-in allowPercentInPath: true (versions 2.1.3 to 2.1.6).
An earlier fix (2.1.3) rejected static paths that still contained % after routing, but this option skipped that check. A malformed sequence such as /static/%%36%31dmin/secret.txt was routed as /static/%61dmin/secret.txt, so middleware on /static/admin/* didn’t run, and serveStatic then decoded %61 to a and served static/admin/secret.txt. Files were still served from inside the configured root; this wasn’t a traversal outside it. Now the second decode is accepted only if it changes nothing except %25 back to %. The same fix shipped in hono 4.13.18.
On the 1.x line, v1.19.19 backports the related serveStatic double-decode fixes from 2.x.
Test the fixes yourself
Spin up a tiny app:
// server.mjs
import { serve } from '@hono/node-server';
import { Hono } from 'hono';
const app = new Hono();
app.get('/admin/secret', (c) => c.text('top secret'));
app.get('/public/hello', (c) => c.text('hello'));
serve({ fetch: app.fetch, port: 3000 });
Then send a raw backslash with curl. --path-as-is stops curl from normalising the path:
node server.mjs &
curl -i --path-as-is 'http://127.0.0.1:3000/public\..\admin/secret'
# Patched: HTTP/1.1 400 Bad Request
# Unpatched: 200 and "top secret"
curl -i 'http://127.0.0.1:3000/public/hello?q=a\b'
# Backslash in the query string is still allowed: 200
Add the first request to your integration tests so a future downgrade can’t bring the bug back.
Defence in depth for proxy setups
Upgrading fixes this bug, but the general lesson is that your proxy and your app must agree on what a path means. A few habits help:
- Keep authorisation checks inside the application, not only at the proxy.
- Normalise or reject unusual paths at the edge too. For example, many proxies can reject requests containing a backslash.
- Re-run security tests after changing proxies, CDNs or adapters.
The non-security fixes in 2.1.8
v2.1.8 (12 November) doesn’t fix a published advisory, but it’s worth having. It forwards duplex to the native request, stops chaining a promise per chunk while streaming a response, cancels the response body when the client has already disconnected, cancels late HTTP/2 response bodies, and avoids sending a “complete” response when the body fails during the early read.
Upgrade checklist
- Run
npm ls @hono/node-serverin every service. - Upgrade 2.x to 2.1.8 and 1.x to 1.19.19, and bump
honoitself to 4.13.18 or later. - Search for
allowPercentInPathandupgradeWebSocketto see which advisories applied to you. - Add the backslash curl test to CI.
- Review proxy rules that protect paths like
/adminor/internal.
Takeaway
None of these advisories is rated critical, but together they cover proxy bypasses, WebSocket origin spoofing and a process crash, all fixed with a version bump. Upgrade to @hono/node-server 2.1.8 (or 1.19.19 on 1.x), keep access control inside your app, and add a regression test for odd paths. The full details are in the project’s security advisories.
