Medium

Hono: `mount()` and `app.mount()` can forward a path that bypasses middleware scoped inside the mount prefix

  • Disclosed: 12.11.2026
  • Updated: 13.11.2026 01:17

Summary

mount() and app.mount() remove the mount prefix from the request path and forward the rest to the mounted application. Two mistakes in that step let a crafted request reach a route of the mounted application that the outer application protects with path-scoped middleware, such as an authentication check on /app/admin/*. The outer application routes on the original path, so the middleware does not run.

Details

  1. Dynamic prefix (all affected versions): for a mount such as /api/:tenant/*, the prefix was removed by the length of the route pattern, not of the matched prefix. A request with a longer or shorter first segment is cut in the middle, so /api/a/xxxxx/admin/secret reaches the mounted application as /admin/secret.
  2. Re-normalization (since 4.12.21): the forwarded path was built from the decoded request path and assigned to url.pathname, which turns a decoded backslash into / and collapses ... /app/public%5C..%5Cadmin/secret reaches the mounted application as /admin/secret.

The fix removes the prefix segment by segment from the raw pathname, using the matched parameter values for its length. Route patterns that cannot be handled safely now throw: duplicate parameter names and a wildcard inside the last segment such as /assets*. A trailing slash in an app.mount() prefix no longer removes an extra segment.

Impact

An unauthenticated client can reach a route of a mounted application that the outer application protects with path-scoped middleware.

This affects applications that use mount() or app.mount() and rely on middleware registered on a sub-path inside the mount prefix for authentication or authorization.

Workarounds

Register the authentication middleware inside the mounted application.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package hono < 4.13.16 4.13.16

References

CVSS score 5.3/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Weakness (CWE)
CWE-288
Platform
npm
Package
hono
Disclosed
12.11.2026
Updated
13.11.2026 01:17

Sources and licenses

OSV / GitHub Advisory Database - GHSA-4m76-xfj5-7975 - CC BY 4.0

Vulnerability history: hono

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (57) in the archive
Total entries
57
First → latest
12.2023 11.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 7
  • Medium 45
  • Low 5

Disclosures per year

  1. 2023: 1
  2. 2024: 3
  3. 2025: 4
  4. 2026: 49
Severity:
  1. Hono: `mount()` and `app.mount()` can forward a path that bypasses middleware scoped inside the mount prefix this entry
    Medium · 5.3 CVE-2026-126357 < 4.13.16 4.13.16
  2. High · 8.1 CVE-2025-62610 >= 1.1.0, < 4.10.2 4.10.2
  3. High · 7.5 CVE-2025-58362 >= 4.8.0, < 4.9.6 4.9.6

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.