All vulnerabilities

npm

CVE-2026-47676

Hono: app.mount() strips mount prefix using undecoded path, causing incorrect routing for percent-encoded paths

Severity
Medium 5.3
Published
4 Jun 2026
Last changed
10 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
4.12.21
Exploit chance
0.3% in the next 30 daysHigher than 17% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
HTTP request smuggling (CWE-444)Protection mechanism failure (CWE-693)
Attack
Over the network · No login needed · No user action needed
Attacker can
Read some data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Also known as
GHSA-2gcr-mfcq-wcc3
Sources
OSV.dev and GitHub

Description

app.mount() strips the mount prefix from the incoming request path using the raw URL pathname, while route matching is performed against the percent-decoded path. This inconsistency causes the prefix to be stripped at the wrong position when the path contains percent-encoded multi-byte characters, resulting in the mounted sub-application receiving an incorrect path.

When app.mount(prefix, subApp) is called, Hono calculates the number of characters to strip based on the decoded mount prefix length, but then applies that slice to the raw URL pathname. When the URL contains percent-encoded characters that expand to fewer characters when decoded (such as encoded non-ASCII characters), the two representations have different lengths, so the prefix is stripped at the wrong byte offset.

As a result, the sub-application receives a path that does not correspond to the intended sub-path — it may receive a partial or garbled path instead of the expected value after the mount prefix is removed.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
hononpm · osv:npm:hono
  • Every version before 4.12.21

About hono

Weekly downloads (npm)
108,805,821npm, 16 Nov 2026

References