All posts

Hono’s new advisories: upgrade to 4.13.16, and check how you use middleware.

Hono 4.13.16 fixes five advisories: mount() and RegExpRouter middleware bypasses, a csrf() gap and a form validator skip. Plus two @hono/node-server fixes. What to check.

Published
Reading time
7 min
By
Girish Babu GV

What happened#

Hono is a small web framework that runs on Node.js, Cloudflare Workers, Deno, Bun and other runtimes. The advisories were published by the maintainers on 1 and 2 November 2026 and were reviewed and added to GitHub’s advisory database on 12 November, which is why they are surfacing now. The registry shows hono@4.13.16 was published on 1 November, and @hono/node-server 2.1.6 and 1.19.18 on 2 November.

None of the seven is rated above Moderate. What they have in common, according to the advisories, is that code developers use as a gatekeeper (path-scoped middleware, csrf(), form validation) could be skipped by a request shaped in a particular way. That makes them worth a look even at a Moderate rating, because the impact depends on what sits behind the middleware.

The advisories#

Hono advisories, as shown on the advisory pages
IssueIDSeverityFixed in
mount() can forward a path that bypasses scoped middlewareCVE-2026-126357Moderate, 5.3hono 4.13.16
RegExpRouter skips wildcard middleware for some routesCVE-2026-126358Moderate, 5.3hono 4.13.16
csrf() does not check hyperlink-auditing requestsCVE-2026-126355Moderate, 5.3hono 4.13.16
validator('form') skips multipart requests with extra parametersCVE-2026-126356Moderate, 5.3hono 4.13.16
css helper does not escape a split closing tag (HTML injection)CVE-2026-126359Low, 3.4hono 4.13.16
Backslash in the request path bypasses proxy path rulesCVE-2026-126210Moderate, 5.3@hono/node-server 2.1.6, 1.19.18
Unhandled ECONNRESET in WebSocket upgrade can crash the processCVE-2026-126343Moderate, 5.3@hono/node-server 2.1.6

In plain terms, per the advisories:

  • mount(). mount() strips a prefix and forwards the rest to a mounted app. Two flaws let a crafted request reach a mounted route that the outer app protects with path-scoped middleware: dynamic prefixes were trimmed by the pattern’s length rather than the matched length, and since 4.12.21 the decoded path was re-normalised, which turns encoded backslashes into slashes and collapses ... The advisory says this lets unauthenticated clients reach protected routes in apps that rely on sub-path middleware inside a mount prefix for auth. Its workaround is to register the authentication middleware inside the mounted app.
  • RegExpRouter. The advisory says this router, which the default SmartRouter often selects, sometimes skipped wildcard middleware in three cases: a parameter written with the explicit default pattern such as {[^/]+}; middleware on /admin/* not applying to a route registered as /admin*; and paths containing an encoded line terminator. It affects 4.1.4 through 4.13.15, and its workaround is to use TrieRouter.
  • csrf(). The middleware only checked requests whose content type an HTML form can send. Chromium’s hyperlink auditing (<a ping>) sends a cross-origin POST with cookies and the content type text/ping, which was skipped. The advisory says the exposed endpoints are those whose effect doesn’t depend on the request body, and that with the default SameSite=Lax cookie the session cookie only goes cross-site for a same-site origin or a SameSite=None cookie. It says Firefox does not send pings by default.
  • validator('form'). A multipart/form-data header with a parameter other than boundary, such as charset, was not recognised, so the validator handed an empty object to your callback without reading the body, while the handler could still read the fields itself. It affects 4.5.1 through 4.13.15 and doesn’t affect application/x-www-form-urlencoded.
  • css helper. Rated Low. It only matters when an untrusted value is interpolated directly after a < in the template text, or when adjacent untrusted values are interpolated.
  • @hono/node-server, path. The adapter passed the raw request target to the URL parser, which treats a backslash as a slash. The advisory says this matters when a reverse proxy, load balancer or WAF keeps the backslash and applies path rules to the original path. It says access control inside the Hono app is not affected, because it runs on the rewritten path.
  • @hono/node-server, WebSocket. With WebSocket support enabled and asynchronous middleware on the upgrade path, an unauthenticated client that resets the connection before the app responds can crash the process. It affects 2.0.0 up to 2.1.6 only.

Am I affected?#

Each advisory is conditional, so the quickest check is to search your code for the feature involved. The fixed versions from the table are the baseline: anything on hono before 4.13.16, or on @hono/node-server before 2.1.6 (or 1.19.18 on the 1.x line), is on the affected side.

Does the issue apply to your app?
Look forThen check
app.mount(Is authentication or authorization middleware registered on the outer app, scoped by path to the mount prefix?
app.use('/something/*', ...)Do you use the default router (or RegExpRouter) with wildcard middleware for auth? Do any routes use the form /prefix* or custom parameter patterns?
csrf()Do any state-changing routes ignore the request body? Are your session cookies SameSite=None, or served to a same-site origin?
validator('form', ...)Does your callback accept an empty object? Does the handler later read the body itself?
css`...`Is any interpolated value user-controlled, directly after a < character?
@hono/node-serverDo you sit behind a proxy or WAF with path-based rules, or use WebSocket upgrades with async work?

What to do now#

  1. Find your versions. Check every project that uses Hono, including monorepo packages, and anything that bundles it.
  2. Upgrade hono to 4.13.16 or later (the registry’s latest is 4.13.18), and @hono/node-server to 2.1.6 or later, or 1.19.18 if you are on the 1.x line.
  3. Read the breaking changes before deploying. The release notes say mount() now throws for routes such as /assets* and for duplicate parameter names, that RegExpRouter throws UnsupportedPathError for custom patterns that can match an empty string, and that any PreparedRegExpRouter data must be regenerated. Run your tests and start the app once before you ship.
  4. Add depth where you can. The advisories’ own workarounds point the same way: keep authentication inside the app that owns the routes, validate the parsed body in the handler, and use SameSite=Strict cookies where your flows allow it.
Check, then update
# Which Hono versions do you have (including nested ones)?
npm ls hono @hono/node-server

# Where do you use the affected features?
grep -rnE "\.mount\(|csrf\(|validator\('form'|SmartRouter|RegExpRouter" src 2>/dev/null

# Update
npm install hono@latest @hono/node-server@latest

The advisories don’t say whether any of these has been exploited, and none lists indicators to look for. If you relied on the affected middleware for access control on a public app, a sensible precaution is to review your access logs for requests with unusual paths (backslashes, encoded line breaks) hitting protected routes. That is my own suggestion, not advice from the advisories.

How I checked this site#

This site is a Next.js project on Vercel. I searched its package.json and package-lock.json for hono and found no match, so it does not depend on Hono directly or through another package. That covers this repository only.

What the sources don’t say#

  • Whether anyone has exploited any of the seven. The advisories don’t say either way.
  • How many apps are in the affected configurations. Hono is widely used, but the conditions above are narrow, and the advisories give no numbers.
  • I did not read independent coverage. My second source is the npm registry, for versions, publish dates and peer dependencies, plus the project’s own release notes.

My take#

My own opinion, not from the advisories.

Several of these seven are really the same lesson: a path check done in one place and a route match done in another can disagree. If you can, put authorization checks next to the handler (or inside the mounted app) rather than relying only on a path-scoped wrapper around it, and treat a change in how paths are normalised as something to test, not just to upgrade past.

Sources#

Keep reading

Esc