GHSA-5r4p-p66f-jhc7: Medium severity npm/hono vulnerability

Published Oct 20, 2026
·
Updated

Summary

serveStatic decodes the request path a second time after Hono has already decoded it for routing. A crafted request can be routed as one path and served as another, so middleware mounted on a static prefix does not run for a file under that prefix.

Details

Hono decodes the request path once before routing. serveStatic decoded it again before resolving the file. With a malformed percent-encoded sequence, the first decode leaves part of the path encoded, the router matches the encoded form, and the second decode resolves the real directory. The file is still resolved inside the configured root; this is not a traversal outside it.

Impact

An unauthenticated attacker may reach static files without the middleware on their prefix running, for example an authentication check. This affects applications that mount middleware on part of the directory served by serveStatic. Applications that serve only public files are not affected.

Affected Software

1 affected componentFixes available
npm/hono>=4.12.4<4.13.11
4.13.11

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/hono to a version that resolves this vulnerability.

    Fixed in 4.13.11

Event History

Oct 20, 2026
Advisory Published
via GitHub·02:36 PM
Data Sourced
via GitHub·02:36 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications are affected only if they use serveStatic and mount middleware, such as authentication, on a prefix within the directory served by that static handler. Applications serving only public static files are not affected.

2

What does an attacker need to exploit it?

An unauthenticated attacker needs to send a crafted request containing a malformed percent-encoded path sequence. The mismatch between routing and static-file resolution can cause middleware on the relevant static prefix to be skipped.

3

Can this be used to read files outside the configured static root?

No. The resolved file remains inside the configured root; the issue is a middleware-bypass condition rather than directory traversal outside that root.

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