REDHAT-BUG-2572863: Medium severity npm/hono vulnerability

Published Nov 12, 2026
·
Updated

Hono is a Web application framework that provides support for any JavaScript runtime. From 4.1.4 until 4.13.16, RegExpRouter can omit wildcard middleware in three version-specific cases: since 4.13.0, middleware using the explicit default parameter pattern in /api/:tenant{[^/]+}/admin/ is not applied to a route written as /api/:tenant/admin/:id; since 4.1.4, middleware on /admin/ is not applied to a route registered as /admin for paths under /admin/; and since 4.4.0, a request path containing an encoded line terminator can reach the not-found handler without wildcard middleware. The default SmartRouter selects RegExpRouter for most applications, and the router's registration-time coverage calculation treated the first two matching pattern pairs as different while its compiled wildcard did not match line terminators in the third case. An unauthenticated client can reach a route handler or the not-found handler without authentication or authorization middleware registered on the wildcard path. TrieRouter, LinearRouter, and PatternRouter apply the middleware in the three described cases. This issue is fixed in version 4.13.16.

Affected Software

1 affected component
npm/hono>=4.1.4<4.13.16

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 4.13.16

Event History

Nov 12, 2026
Data Sourced
via Red Hat·10:31 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which applications are realistically exposed to this middleware bypass?

Applications using Hono's default SmartRouter are commonly exposed because it selects RegExpRouter for most applications. Exposure depends on using wildcard authentication or authorization middleware together with one of the affected route-pattern cases.

2

What does an attacker need to exploit the issue?

An unauthenticated client only needs to request an affected route or, in the encoded-line-terminator case, a path that reaches the not-found handler. Successful exploitation requires that authentication or authorization middleware is registered on the wildcard path and omitted by RegExpRouter.

3

Which route configurations can bypass wildcard middleware?

The affected cases are /api/:tenant{[^/]+}/admin/* middleware with a /api/:tenant/admin/:id route since 4.13.0; /admin/* middleware with a /admin* route for paths beneath /admin/ since 4.1.4; and request paths containing an encoded line terminator since 4.4.0.

4

What can be done if upgrading is not immediately possible?

Use TrieRouter, LinearRouter, or PatternRouter instead of RegExpRouter, as these routers apply middleware in all three described cases. Review affected wildcard-protected routes and ensure authorization is also enforced by the individual route handlers where practical.

5

How can I determine whether an application is affected?

Check whether the application uses a Hono version from 4.1.4 through 4.13.16 and whether SmartRouter or RegExpRouter is in use. Then review route registration for the affected wildcard and route-pattern combinations, and test whether unauthenticated requests reach the route or not-found handler without the expected middleware.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203