NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

CVE-2026-126358 — hono

MEDIUMFix: honojs/hono@8a103aa

CVE-2026-126358 is a medium-severity (CVSS 5.3) CWE-863 vulnerability in hono. A fix is available for hono — see the affected versions and patch details below.

Hono: RegExpRouter skips wildcard middleware for some route sets and for paths with an encoded line terminator

Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 12, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

7Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
hononpm
104.6Mdownloads / week

Description

Summary

RegExpRouter, which the default SmartRouter selects for most applications, skipped wildcard middleware in three cases, so a route handler ran without the middleware registered for it:

  1. Middleware whose parameter is written with the explicit default pattern, such as /api/:tenant{[^/]+}/admin/*, was not applied to a route written as /api/:tenant/admin/:id. (since 4.13.0)
  2. Middleware on /admin/* was not applied to a route registered on /admin* for paths under /admin/. (since 4.1.4)
  3. For a path with an encoded line terminator (%0A, %0D, %E2%80%A8, %E2%80%A9), no wildcard pattern matched, so the request reached the not-found handler without any wildcard middleware. (since 4.4.0)

TrieRouter, LinearRouter and PatternRouter apply the middleware in all three cases.

Details

RegExpRouter decides at registration time which wildcard middleware covers which route. In cases 1 and 2 it treated patterns that match the same requests as different ones. In case 3 the compiled wildcard did not match line terminators.

The fix derives the coverage from the structure of the registered paths and lets wildcards match line terminators. It also corrects other differences from the other routers (a wildcard in the middle of a path with parameters, duplicate middleware, middleware on static routes), and rejects custom patterns that can match the empty string, such as {[0-9]*}, with UnsupportedPathError. PreparedRegExpRouter data must be regenerated.

Impact

An unauthenticated client can reach a route handler, or the not-found handler, without the authentication or authorization middleware registered on a wildcard path.

This affects applications that use RegExpRouter, directly or through the default SmartRouter, and rely on wildcard middleware for authentication or authorization.

Workarounds

Use new Hono({ router: new TrieRouter() }).

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmhono≥ 4.1.4&&< 4.13.164.13.16npm install hono@4.13.16

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for hono, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update hono to 4.13.16 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-126358 is resolved across your whole dependency graph.

  3. Workarounds

    Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.

Frequently Asked Questions

### Summary RegExpRouter, which the default `SmartRouter` selects for most applications, skipped wildcard middleware in three cases, so a route handler ran without the middleware registered for it: 1. Middleware whose parameter is written with the explicit default pattern, such as `/api/:tenant{[^/]+}/admin/*`, was not applied to a route written as `/api/:tenant/admin/:id`. (since 4.13.0) 2. Middleware on `/admin/*` was not applied to a route registered on `/admin*` for paths under `/admin/`. (since 4.1.4) 3. For a path with an encoded line terminator (`%0A`, `%0D`, `%E2%80%A8`, `%E2%80%A9`)
O3 Security · Impact-Aware SCA

Is CVE-2026-126358 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2026-126358: hono — Fixed in 4.13.16