MEDIUM · CVSS 3.1 5.3 EPSS 0.5% · 33th percentile CWE-863

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

Published 2026-11-12 · Updated 2026-11-12 · Also known as GHSA-h7mg-cq63-vhpq

Summary

Hono's RegExpRouter incorrectly skips wildcard middleware in specific routing and path conditions, allowing requests to bypass authentication or authorization checks. Engineering and security teams using Hono with RegExpRouter or the default SmartRouter should update their packages.

Who is affected

Unauthenticated clients can reach route handlers or the not-found handler without triggering registered wildcard authentication or authorization middleware. This affects applications using RegExpRouter where specific wildcard patterns, routes with encoded line terminators, or certain parameter configurations are utilized.

Exploitability

The vulnerability is remotely exploitable over the network without requiring authentication or user interaction with a low attack complexity. It impacts confidentiality with a base score of 5.3 (Medium) under CVSS 3.1, though current empirical data shows a low exploitation probability (EPSS 0.003).

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
npm hono >= 4.1.4, < 4.13.16 4.13.16 npm install [email protected]

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Attack vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionNone
ScopeUnchanged
ConfidentialityLow
IntegrityNone
AvailabilityNone

FAQ

Which Hono routers are affected?

Only RegExpRouter (which is selected by default in SmartRouter for most applications) is affected. TrieRouter, LinearRouter, and PatternRouter are not affected.

What versions of Hono are vulnerable?

The vulnerability affects npm package hono introduced in version 4.1.4 and fixed in version 4.13.16.

Is this vulnerability actively exploited in the wild?

No, CISA Known Exploited Vulnerabilities tracking indicates no active exploitation.

Original advisory 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() })`.

References

Source records: GHSA-h7mg-cq63-vhpq (OSV.dev) · EPSS by FIRST, 2026-11-26.