Hono: Middleware bypass via repeated slashes in serveStatic
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/*
However, serveStatic may interpret both paths as the same file location (e.g., admin/secret.txt) and return the file.
This inconsistency allows a request such as:
GET //admin/secret.txt
to bypass middleware registered on /admin/* and access protected files.
The issue has been fixed by rejecting paths that contain repeated slashes, ensuring consistent behavior between route matching and static file resolution.
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.
Affected Packages
| Ecosystem | Package | Vulnerable Versions | Patched Version |
|---|---|---|---|
| npm |
hono
|
< 4.12.12 |
4.12.12
|
deps(deps): bump the security-patches group across 4 directories with 2 updates
Open 14 days agochore(deps): bump the npm_and_yarn group across 11 directories with 24 updates
Open 15 days agodeps(deps): bump the security-patches group across 4 directories with 2 updates
Closed 15 days agobuild(deps): Bump the npm_and_yarn group across 1 directory with 15 updates
Closed 15 days agochore(deps): bump the npm_and_yarn group across 5 directories with 23 updates
Closed 15 days agochore(deps): bump the npm_and_yarn group across 24 directories with 5 updates
Open 16 days agoBump the npm_and_yarn group across 5 directories with 7 updates
Open 16 days agoBump the npm_and_yarn group across 4 directories with 9 updates
Closed 16 days agobuild(deps): bump the npm_and_yarn group across 2 directories with 5 updates
Open 16 days agochore(deps): bump the npm_and_yarn group across 9 directories with 8 updates
Closed 16 days agochore(deps): Bump the npm_and_yarn group across 4 directories with 5 updates
Closed 17 days agoBump the npm_and_yarn group across 4 directories with 7 updates
Open 17 days agochore(deps): bump the npm_and_yarn group across 15 directories with 10 updates
Closed 18 days agochore(deps): bump the npm_and_yarn group across 15 directories with 9 updates
Closed 18 days agoBump the npm_and_yarn group across 19 directories with 5 updates
Open 19 days agoBump the npm_and_yarn group across 1 directory with 5 updates
Closed 20 days agobuild(deps): bump hono from 4.12.9 to 4.12.15 in /server
Open 20 days agoBump the npm_and_yarn group across 18 directories with 4 updates
Open 20 days agobuild(deps): bump the minor-and-patch group across 1 directory with 7 updates
Closed 20 days agoBump hono from 4.6.0 to 4.12.15 in /backend
Closed 21 days agodeps: bump hono from 4.12.10 to 4.12.15
Open 21 days agochore(deps): bump the all-minor-and-patch group across 1 directory with 26 updates
Open 21 days agodeps(deps): bump the security-patches group across 3 directories with 2 updates
Open 21 days agochore(deps): bump the minor-and-patch group across 1 directory with 25 updates
Closed 21 days agochore(deps): bump the production group across 1 directory with 12 updates
Open 21 days agochore(deps): bump the npm_and_yarn group across 1 directory with 3 updates
Open 21 days agochore(deps): Bump hono from 4.11.4 to 4.12.14
Closed 21 days agochore(deps): bump the dependencies group across 1 directory with 6 updates
Closed 21 days agobuild(deps): bump the npm_and_yarn group across 9 directories with 9 updates
Closed 21 days agochore(deps): bump the npm_and_yarn group across 1 directory with 5 updates
Closed 21 days agoBump hono from 4.12.3 to 4.12.15
Closed 21 days agochore(deps)(deps): bump hono from 4.11.2 to 4.12.15
Open 21 days agochore(deps): Bump the npm-non-major group across 1 directory with 8 updates
Open 22 days agoBump the npm_and_yarn group across 5 directories with 5 updates
Closed 22 days agodeps(api)(deps): bump hono from 4.11.9 to 4.12.15 in /cloudflare/forgescan-api in the hono group
Open 22 days agochore(deps): bump the production-dependencies group across 1 directory with 6 updates
Open 22 days agochore(deps): bump the all-minor-patch group across 1 directory with 23 updates
Open 22 days agochore(deps): Bump hono from 4.6.0 to 4.12.15
Open 22 days agodeps: Bump the minor-and-patch group across 1 directory with 12 updates
Open 22 days agochore(deps): bump hono from 4.12.9 to 4.12.15
Open 22 days agoBump the npm_and_yarn group across 1 directory with 5 updates
Open 22 days agoBump hono from 4.12.9 to 4.12.15
Closed 22 days agobuild(deps): bump the npm_and_yarn group across 1 directory with 23 updates
Open 22 days agochore(deps): bump hono from 4.12.8 to 4.12.15 in /frontend
Closed 22 days agochore(deps): bump hono from 4.12.10 to 4.12.15 in /dashboard
Open 22 days agochore(deps): Bump hono from 4.12.10 to 4.12.15 in /apps/translator/server in the minor-and-patch group across 1 directory
Closed 23 days agoBump hono from 4.12.6 to 4.12.15
Open 23 days agochore(deps): Bump the npm_and_yarn group across 1 directory with 2 updates
Closed 23 days agochore(deps): bump hono from 3.11.8 to 4.12.14 in the npm_and_yarn group across 1 directory
Closed 24 days agoBump the npm_and_yarn group across 1 directory with 12 updates
Open 24 days agoActions
Advisory Details
| Published: | April 08, 2026 about 1 month ago |
| Updated: | May 11, 2026 8 days ago |
| CVSS Score: | 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| EPSS: | 0.02% 6th percentile |
| Source: | Github |
| Classification: | GENERAL |
| UUID: | GSA_kwCzR0hTQS13bW1tLWY5MzktNmc5Y84ABU3l |
PR Statistics
References
- https://github.com/honojs/hono/security/advisories/GHSA-wmmm-f939-6g9c
- https://github.com/honojs/hono/commit/9aff14bd727f8b0435c963363fd803260e7b8e3c
- https://github.com/honojs/hono/releases/tag/v4.12.12
- https://nvd.nist.gov/vuln/detail/CVE-2026-39407
- https://github.com/advisories/GHSA-wmmm-f939-6g9c