---
title: "GHSA-4m76-xfj5-7975: Hono: `mount()` and `app.mount()` can forward a path that bypasses middleware scoped inside the mount prefix"
description: "Moderate severity. Hono: `mount()` and `app.mount()` can forward a path that bypasses middleware scoped inside the mount prefix. Affects hono; fixed in 4.13.16."
url: https://inlinr.com/advisories/GHSA-4m76-xfj5-7975
lang: en
---

[Packages](https://inlinr.com/packages) / [hono](https://inlinr.com/packages/hono) / [Security](https://inlinr.com/packages/hono/security)

Moderate Vulnerability GHSA-4m76-xfj5-7975 CVE-2026-126357 Published 12 Nov 2026

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

Your version 

Affected releases · [hono](https://inlinr.com/packages/hono)

- 4.x 4.0.0 – 4.13.15 Fixed in 4.13.16
- 3.x and older 0.0.1 – 3.12.12 No fix, no longer updated

On 4.x, the newest line:

```
npm install hono@4.13.16
```

Every release on a timeline

4.x 

1. Affected

4.0.0 – 4.13.15  
197 releases
2. Fixed

4.13.16 – 4.13.19  
4 releases, latest

3.x 

1. Affected

3.0.0 – 3.12.12  
92 releases

2.x 

1. Affected

2.0.0 – 2.7.8  
49 releases

1.x 

1. Affected

1.0.0 – 1.6.4  
29 releases

0.x 

1. Affected

0.0.1 – 0.5.10  
45 releases

416 stable releases of hono, oldest to newest, one row per major.

## What happens

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.

## How it is exploited

Exploitable over the network, with no account and no action from a user.

- **Confidentiality**: low
- **Integrity**: none
- **Availability**: none

CVSS:3.1/​AV:N/​AC:L/​PR:N/​UI:N/​S:U/​C:L/​I:N/​A:N

## References

- [Reference](https://github.com/honojs/hono/security/advisories/GHSA-4m76-xfj5-7975 "https://github.com/honojs/hono/security/advisories/GHSA-4m76-xfj5-7975")  
github.com/honojs/hono/security/advisories/GHSA…
- [Fix commit](https://github.com/honojs/hono/commit/34f90432a1794b28e52802670efcd01963f716d6 "https://github.com/honojs/hono/commit/34f90432a1794b28e52802670efcd01963f716d6")  
34f9043
- [Package](https://github.com/honojs/hono "https://github.com/honojs/hono")  
github.com/honojs/hono
- [Reference](https://github.com/honojs/hono/releases/tag/v4.13.16 "https://github.com/honojs/hono/releases/tag/v4.13.16")  
github.com/honojs/hono/releases/tag/v4.13.16

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
