CVE-2026-29045: Hono: Arbitrary file access via serveStatic vulnerability

Published Mar 4, 2026
·
Updated

Summary

When using serveStatic together with route-based middleware protections (e.g. app.use('/admin/', ...)), inconsistent URL decoding allowed protected static resources to be accessed without authorization.

The router used decodeURI, while serveStatic used decodeURIComponent. This mismatch allowed paths containing encoded slashes (%2F) to bypass middleware protections while still resolving to the intended filesystem path.

Details

The routing layer preserved %2F as a literal string, while serveStatic decoded it into / before resolving the file path.

Example:

Request: /admin%2Fsecret.html

- Router sees: /admin%2Fsecret.html → does not match /admin/ - Static handler resolves: /admin/secret.html

As a result, static files under the configured static root could be served without triggering route-based protections.

This only affects applications that both:

- Protect subpaths using route-based middleware, and - Serve files from the same static root using serveStatic.

This does not allow access outside the static root and is not a path traversal vulnerability.

Impact

An unauthenticated attacker could bypass route-based authorization for protected static resources by supplying paths containing encoded slashes.

Applications relying solely on route-based middleware to protect static subpaths may have exposed those resources.

Other sources

Hono is a Web application framework that provides support for any JavaScript runtime. Prior to version 4.12.4, when using serveStatic together with route-based middleware protections (e.g. app.use('/admin/', ...)), inconsistent URL decoding allowed protected static resources to be accessed without authorization. The router used decodeURI, while serveStatic used decodeURIComponent. This mismatch allowed paths containing encoded slashes (%2F) to bypass middleware protections while still resolving to the intended filesystem path. This issue has been patched in version 4.12.4.

MITRE

Affected Software

2 affected componentsFixes available
npm/hono<4.12.4
4.12.4
Hono Hono Node.js<4.12.4

Event History

Mar 4, 2026
Advisory Published
via GitHub·07:48 PM
Data Sourced
via GitHub·07:48 PM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·10:09 PM
Data Sourced
via MITRE·10:09 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·11:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Dec 1, 58158
Event
via FIRST·04:57 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-29045?

CVE-2026-29045 is rated as a high severity vulnerability due to its potential to allow unauthorized access to protected static resources.

2

How do I fix CVE-2026-29045?

To fix CVE-2026-29045, update your 'hono' package to version 4.12.4 or later.

3

What type of applications are affected by CVE-2026-29045?

Applications using the 'hono' framework with serveStatic and route-based middleware protections are affected by CVE-2026-29045.

4

What causes the vulnerability in CVE-2026-29045?

The vulnerability in CVE-2026-29045 is caused by inconsistent URL decoding between the router and the serveStatic middleware.

5

Is CVE-2026-29045 easy to exploit?

Yes, CVE-2026-29045 can be exploited relatively easily due to the misconfiguration of URL decoding methods.

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