Packages / @hono/node-server / Security

ModerateVulnerabilityGHSA-92pp-h63x-v22mCVE-2026-39406Published 8 Apr 2026

@hono/node-server: Middleware bypass via repeated slashes in serveStatic

Affected releases · @hono/node-server

  • 1.x1.0.0 – 1.19.12Fixed in 1.19.13
  • 0.6.x and older0.2.0 – 0.6.0No fix, no longer updated

On 1.x, the newest line:

npm install @hono/node-server@1.19.13
2.x
  1. Not affected

    2.0.0 – 2.1.5

    18 releases, latest

1.x
  1. Affected

    1.0.0 – 1.19.12

    70 releases

  2. Fixed

    1.19.13 – 1.19.17

    4 releases

0.x
  1. Affected

    0.2.0 – 0.6.0

    10 releases

102 stable releases of @hono/node-server, oldest to newest, one row per major.

Is your project affected?

Paste your package.json, or type the range you declare for @hono/node-server. It is read in your browser and sent nowhere.

What happens

Summary

A path handling inconsistency in serveStatic allows protected static files to be accessed by using repeated slashes (//) in the request path.

When route-based middleware (e.g., /admin/*) is used for authorization, the router may not match paths containing repeated slashes, while serveStatic resolves them as normalized paths. This can lead to a middleware bypass.

Details

The routing layer and serveStatic handle repeated slashes differently.

For example:

  • /admin/secret.txt => matches /admin/*

  • //admin/secret.txt => may not match /admin/*

This inconsistency allows a request such as:

GET //admin/secret.txt

to bypass middleware registered on /admin/* and access protected files.

Impact

An attacker can access static files that are intended to be protected by route-based middleware by using repeated slashes in the request path.

This can lead to unauthorized access to sensitive files under the static root.

This issue affects applications that rely on serveStatic together with route-based middleware for access control.