llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · hono

GHSA-H25J-2P75-QJ33

`mount()` and `app.mount()` forward a wrong path when a custom `getPath` adds a prefix, bypassing middleware scoped inside the mount prefix

Parche disponible
Descargar PNG JSON
CVSS 3.1
5.3
Media
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición9 dDesde la divulgación, 11 nov 2026, 3:55 a. m.
Detección7 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 4.13.18
Monitoreo
Detectada +1
11 nov 26
18 nov 26
20 nov 26
11 nov 26
13 nov 26
15 nov 26
18 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-H25J-2P75-QJ33 divulgada · CVSS 5.3 (GitHub)
Divulgación Modificada Última actualización del registro
Remediación Parche 4.13.18 hono · 0 d desde divulgación
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

The fix for GHSA-4m76-xfj5-7975 in 4.13.16 made `mount()` and `app.mount()` remove the mount prefix from the raw request path by counting the segments of the routed path. When a custom `getPath` adds a prefix to the routed path, for example the host name for host-based routing, the routed path has more segments than the raw path, and one segment too many is removed. The mounted application then receives a different path from the one the outer application routed and protected.

Details

With `getPath` returning `/<host>/<path>` and a mount on `/<host>`, a request for `/admin/secret` reached the mounted application as `/secret`, and a request for `/public/admin/secret` reached it as `/admin/secret`. The outer application routed on `/<host>/public/admin/secret`, so middleware registered on `/<host>/admin/*` did not run, while the mounted application served its `/admin/secret` route.

The forwarded path is now taken from the routed path (`c.req.path`) with the matched prefix removed, so the outer and the mounted application always see the same path. Because the routed path is decoded, the middleware checks that turning it back into a URL does not change its meaning, and responds with 400 otherwise: encoded dot segments, repeated trailing slashes under `strict: false` that a mounted Hono application would strip again, a request URL whose authority contains `?`, `#` or `\`, and percent escapes that do not survive re-parsing. A mount path with an optional regular expression parameter such as `/:id{[0-9]+}?` is not supported and throws; register `/mount` and `/mount/:id{[0-9]+}` separately.

The original percent encoding of the forwarded path is not preserved, for example `%41` can become `A`. Standard `getPath` is unaffected apart from this.

Impact

An unauthenticated client can reach a route of a mounted application that the outer application protects with path-scoped middleware, when the application uses a custom `getPath` that prepends a prefix to the path.

This issue affects applications on 4.13.16 and 4.13.17 that use `mount()` or `app.mount()` together with a custom `getPath` that adds a prefix, and rely on middleware registered on a sub-path inside the mount prefix for authentication or authorization.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
hono≥ 4.13.16 ≤ 4.13.17
4.13.16
4.13.17
4.13.19
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmhono
Corregida 4.13.18 0 d 4.13.19 no afectada
Versiones corregidas4.13.18
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/honojs/hono/security/advisories/GHSA-h25j-2p75-qj33

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.