Home › CVE › JavaScript
CVE-2026-126358 — Hono: RegExpRouter skips wildcard middleware for some route sets and for paths with an encoded line terminator
One of 5 npm:hono vulnerabilities published together by GitHub Advisory: our article covers all of them.
JavaScriptWebNetwork devicesVulnerabilitiesResearch article
Hono Router Flaw Allows Bypass of Middleware in Specific Routing Scenarios
| CVE | CVE-2026-126358 |
|---|---|
| Vendor and product | npm:hono; honojs hono |
| Published | November 22, 2026 06:30 UTC |
| Research cut-off | November 22, 2026 06:15 UTC |
| Sources reviewed | 4: NVD record (last modified 2026-11-13); CISA KEV catalog; GitHub advisory (2026-11-12); FIRST EPSS (2026-11-21) |
Executive summary
CVE-2026-126358 affects the Hono JavaScript framework, enabling unauthenticated users to bypass middleware in particular routing cases. The CVSS 3.1 score is 5.3 MEDIUM, with a vector of AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N, scored by GitHub [3]. The vulnerability impacts versions of Hono from 4.1.4 to 4.13.15, with a fixed version at 4.13.16 [3]. The reviewed sources do not report exploitation [2]. The main action is to update to the fixed version.
Key points
- CVE-2026-126358 affects Hono versions from 4.1.4 to 4.13.15 [3].
- The vulnerability allows unauthenticated users to bypass middleware in specific routing scenarios [3].
- The CVSS 3.1 score is 5.3 MEDIUM, with a vector of AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N, scored by GitHub [3].
- The reviewed sources do not report exploitation [2].
- The fixed version of Hono is 4.13.16 [3].
Vulnerability identification
| CVE ID | Vendor | Product | CWE | CVSS 3.1 | Published | Last Modified | Record Status |
|---|---|---|---|---|---|---|---|
| CVE-2026-126358 | Hono | Hono | CWE-863 | 5.3 MEDIUM, scored by GitHub [3] | 2026-11-13 | 2026-11-13 | Deferred |
Vulnerability description
This issue involves a routing problem in the RegExpRouter component of Hono, where wildcard middleware was not applied in certain situations. The problem arises when a route handler runs without the expected middleware, particularly in three distinct scenarios involving pattern matching [3]. The vulnerability allows unauthenticated users to bypass middleware for specific routes or access the not-found handler without proper checks [3].
Attack surface and exploitation prerequisites
The CVSS vector indicates the vulnerability has network access (AV:N), low access complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N), and no impact on availability (A:N) [1]. The attack can be initiated remotely without authentication [3].
Impact analysis
The CVSS vector shows a low impact on confidentiality (C:L) and no impact on integrity (I:N) or availability (A:N) [1]. The flaw lets people without login credentials get past middleware on some routes, or reach the fallback handler for unmatched requests when no login or permission middleware is attached to a catch-all path [3].
Affected products and versions
| Affected | Fixed |
|---|---|
| hono >= 4.1.4, < 4.13.16 | 4.13.16 [3] |
Exploitation and threat intelligence status
CVE-2026-126358 is not listed in the CISA Known Exploited Vulnerabilities Catalog as of 2026-11-22 [2]. The EPSS score for this CVE is 0.0037 (0.37%), with a percentile of 0.3122, suggesting a low probability of exploitation within the next 30 days [4].
Detection and exposure assessment
Users can determine if they are exposed by checking if their installed version of Hono falls within the affected range: versions 4.1.4 through 4.13.15 [3]. No specific detection steps are provided by the sources [3].
Remediation
The fixed version of Hono is 4.13.16 [3]. A workaround is to use new Hono({ router: new TrieRouter() }) to avoid the issue [3].
Remediation checklist
Evidence gaps
- The sources do not describe the internal workings of the affected component.
- The sources do not mention a workaround beyond the one provided [3].
- The sources do not detail the attack lifecycle or specific scenarios [3].
- The sources do not provide indicators of compromise.
- The sources do not list any mitigations beyond the workaround [3].
References
- CVE-2026-126358 record. NIST National Vulnerability Database (NVD), 2026-11-13. https://nvd.nist.gov/vuln/detail/CVE-2026-126358. Accessed 2026-11-22.
- Known Exploited Vulnerabilities Catalog. Cybersecurity and Infrastructure Security Agency (CISA), 2026-11-22. https://www.cisa.gov/known-exploited-vulnerabilities-catalog. Accessed 2026-11-22.
- GHSA-h7mg-cq63-vhpq / CVE-2026-126358 — Hono: RegExpRouter skips wildcard middleware for some route sets and for paths with an encoded line terminator. GitHub Security Advisory Database, 2026-11-12. https://github.com/advisories/GHSA-h7mg-cq63-vhpq. Accessed 2026-11-22.
- EPSS score for CVE-2026-126358. FIRST, 2026-11-21. https://api.first.org/data/v1/epss?cve=CVE-2026-126358. Accessed 2026-11-22.
Severity breakdown
Medium · 5.3
An attacker without an account can exploit this over the network, without any user action.
- Attack from
- the network (remotely)
- Attack complexity
- low (no special conditions)
- Login needed
- no
- User action needed
- no
- Scope
- stays within the vulnerable component
- Impact
- low on confidentiality, none on integrity and availability
Weakness
- CWE-863: Incorrect Authorization
Affected and fixed versions
| Product | Affected versions | Fixed in |
|---|---|---|
| hono (npm) | ≥ 4.1.4, ≤ 4.13.15 | 4.13.16 |
| honojs hono | >= 4.1.4, < 4.13.16 | — |
References by type
Vendor advisories
Patches and fixed releases
- github.com/honojs/hono/commit/8a103aa59bcfbffd5396b1548a0dff3688777c36
- github.com/honojs/hono/releases/tag/v4.13.16
Other references
Details
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:
- 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) - Middleware on
/admin/*was not applied to a route registered on/admin*for paths under/admin/. (since 4.1.4) - 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
- npm:hono
- honojs hono
Frequently asked questions
What is CVE-2026-126358?
CVE-2026-126358 affects the Hono JavaScript framework, enabling unauthenticated users to bypass middleware in particular routing cases. The CVSS 3.1 score is 5.3 MEDIUM, with a vector of AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N, scored by GitHub. The vulnerability impacts versions of Hono from 4.1.4 to 4.13.15, with a fixed version at 4.13.16. The reviewed sources do not report exploitation. Weakness type: Incorrect Authorization (CWE-863).
How severe is CVE-2026-126358?
CVE-2026-126358 has a CVSS 3.1 base score of 5.3 (medium), from the CNA (github.com). An attacker without an account can exploit this over the network, without any user action.
Is CVE-2026-126358 being exploited?
Not as far as is known: CVE-2026-126358 is not in CISA's Known Exploited Vulnerabilities catalog as of November 26, 2026. EPSS estimates a 0.5% chance that it is exploited in the next 30 days.
Which versions are affected by CVE-2026-126358?
hono (npm) ≥ 4.1.4, ≤ 4.13.15 (fixed in 4.13.16); honojs hono >= 4.1.4, < 4.13.16.
How do I fix CVE-2026-126358?
Update Hono to version 4.13.16. Use new Hono({ router: new TrieRouter() }) as a workaround if updating is not possible. Review routing configurations to ensure middleware is applied correctly.
Timeline & sources
References
Related vulnerabilities & news
- CVE-2026-135230 — @fastify/express
- GHSA-c4hm-4h84-2cf3 / CVE-2026-59726 — ruflo MCP bridge allows unauthenticated remote code execution in default Docker Compose deployments
- CVE-2026-129502: @fastify/http-proxy WebSocket Upgrade Crash Vulnerability
- CVE-2026-129500: @fastify/http-proxy Crash Vulnerability
- CVE-2026-65843 — ForbesLindesay sync-rpc