Hono, the small web framework that runs on Cloudflare Workers, Bun, Deno and Node.js, shipped v4.13.23 on 26 November 2026 with fixes for three security advisories. None of them affect every app. Each one depends on a specific router, helper or runtime, so the useful question is: does my app hit any of these code paths?

This post explains each issue in plain English, shows how to check your own code, and includes a small test file you can run after upgrading.

Upgrade first

npm install hono@^4.13.23
# or
pnpm add hono@^4.13.23
bun add hono@^4.13.23

Confirm the installed version:

npm ls hono

Note that this is the core hono package. Earlier this month there was a separate round of fixes for @hono/node-server, the Node.js adapter, and you should keep both up to date.

Issue 1: TrieRouter treated __proto__ as a registered HTTP method

Advisory: GHSA-656w-x92q-369m

Who is affected: apps that use TrieRouter and accept arbitrary method names. The release notes give two examples: HTTP/2 on Node.js, and hono/method-override.

What went wrong: a request with a method name like __proto__ made the router add a property to Object.prototype. After that, later requests in the same process could fail until it was restarted. In practice, one crafted request could break later requests on a long-running Node.js server until the process restarts.

The fix: the router no longer treats an inherited property as a registered method.

How to tell whether you use TrieRouter: Hono’s default Hono class uses SmartRouter, which picks between RegExpRouter and TrieRouter. You may be using TrieRouter directly if you wrote something like this:

import { Hono } from 'hono'
import { TrieRouter } from 'hono/router/trie-router'

const app = new Hono({ router: new TrieRouter() })

Search your code for TrieRouter and method-override. If either one appears and you run on Node.js, treat this upgrade as urgent.

Issue 2: except() skipped middleware for near-matching paths

Advisory: GHSA-586x-c76g-h528

Who is affected: apps that use except() from hono/combine with a path condition containing a constrained parameter with alternatives, for example :file{.+\.(png|jpg)}.

What went wrong: a path that only started or ended with one of the alternatives also matched the condition. When the wrapped middleware is authentication, that means some requests skipped auth when they shouldn’t have.

The fix: the regular expression of a parameter is now grouped. Routes on TrieRouter that use such a parameter are corrected by the same change.

Here is a typical pattern: protect everything under /api/* except public images.

import { Hono } from 'hono'
import { except } from 'hono/combine'
import { bearerAuth } from 'hono/bearer-auth'

const app = new Hono()

app.use(
  '/api/*',
  except('/api/:file{.+\\.(png|jpg)}', bearerAuth({ token: process.env.API_TOKEN }))
)

app.get('/api/report', (c) => c.text('private report'))
app.get('/api/:file{.+\\.(png|jpg)}', (c) => c.text('public image'))

The intent is that only paths ending in .png or .jpg skip auth. After upgrading, check your own except() conditions. Anything using (a|b) inside a parameter constraint should be covered by a test like the one below.

Issue 3: getPath() dropped the first path segment on Bun

Advisory: GHSA-mhwf-w6q6-q58w

Who is affected: apps running on Bun behind a reverse proxy that blocks routes by path.

What went wrong: for a request without a usable Host header, Bun passes a URL that contains only the path. Hono dropped the first path segment before routing. So a request for /admin/users could be routed as /users, or a request for /x/admin could reach /admin, and that can bypass the proxy’s path rules.

The fix: Hono now reads the path of such a URL correctly.

Even after upgrading, it’s a good idea not to rely only on proxy path rules. Put authorization checks inside the app as well, for example with route-level middleware.

A regression test you can keep

Hono’s app.request() helper lets you test routing without starting a server. This file uses TrieRouter, the except() pattern above, and an odd method name. We ran it against [email protected] on Node.js 24:

// security.test.mjs
import { Hono } from 'hono'
import { TrieRouter } from 'hono/router/trie-router'
import { except } from 'hono/combine'
import { bearerAuth } from 'hono/bearer-auth'

const app = new Hono({ router: new TrieRouter() })

app.use('/api/*', except('/api/:file{.+\\.(png|jpg)}', bearerAuth({ token: 'secret' })))
app.get('/api/report', (c) => c.text('private report'))
app.get('/api/:file{.+\\.(png|jpg)}', (c) => c.text('public image'))
app.get('/', (c) => c.text('home'))

const odd = await app.request('/', { method: '__proto__' })
console.log('__proto__ method ->', odd.status)                        // 404
console.log('prototype keys ->', Object.keys(Object.prototype))       // []
console.log('GET / ->', (await app.request('/')).status)              // 200
console.log('report, no token ->', (await app.request('/api/report')).status)      // 401
console.log('png, no token ->', (await app.request('/api/logo.png')).status)       // 200
console.log('png.txt, no token ->', (await app.request('/api/logo.png.txt')).status) // 401

Run it with:

node security.test.mjs

The important lines are the last two: a real .png skips auth, but logo.png.txt must still return 401. The __proto__ request should be a plain 404 that leaves Object.prototype untouched, and normal routes should keep working afterwards.

To make this part of CI, turn the console.log lines into assertions with node:test and node:assert, or with Vitest.

Hardening tips beyond this release

  • Keep Hono updated automatically. Use Dependabot or Renovate with a short schedule for hono and @hono/* packages. Patch releases are frequent and usually safe.
  • Avoid accepting arbitrary methods unless you need them. If you use method-override, limit it to the methods your app supports.
  • Test negative paths. Most auth bypasses are found by testing paths that almost match a public route.
  • Don’t trust the proxy alone. Treat reverse-proxy path rules as an extra layer, not your only access control.

Takeaway

Hono 4.13.23 closes three narrow but real holes: prototype pollution through odd HTTP method names on TrieRouter, an except() matching bug that could skip auth middleware, and a Bun path-parsing issue that could bypass proxy rules. Upgrade with npm install hono@^4.13.23, search your code for TrieRouter, method-override and except(, and add the regression test above. The release notes link to each advisory for full details.