@hono/node-server
2.1.9 · 17 Nov 2026MIT105.3M / weekRepositorynpmAtom feed
2.1.11 is the newest release of 2.x.
In short
2 security
- Security
serveStaticwithallowPercentInPathstill allows the double-decode middleware bypass - Security
Affects:
serveStaticwithallowPercentInPath: true. The fix for GHSA-rmxm-3fg6-px4f rejects a path containing%, but theallowPercentInPathoption skipped that check entirely. A malformed percent sequence such as/static/%%36%31dmin/secret.txtwas routed as/static/%61dmin/secret.txt, so middleware on/static/admin/*did not run, andserveStaticthen decoded%61toaand servedstatic/admin/secret.txt. The default configuration was already fixed in 2.1.3. GHSA-fj57-4f93-cfw6
Release note
Security fixes
This release includes a fix for the following security issue:
serveStatic with allowPercentInPath still allows the double-decode middleware bypass
Affects: serveStatic with allowPercentInPath: true. The fix for GHSA-rmxm-3fg6-px4f rejects a path containing %, but the allowPercentInPath option skipped that check entirely. A malformed percent sequence such as /static/%%36%31dmin/secret.txt was routed as /static/%61dmin/secret.txt, so middleware on /static/admin/* did not run, and serveStatic then decoded %61 to a and served static/admin/secret.txt. The default configuration was already fixed in 2.1.3. GHSA-fj57-4f93-cfw6
serveStatic now accepts the second decode only when its result equals the routed path with %25 replaced by %. File names containing a literal %, requested as %25, are served as before.
The same fix ships in hono v4.13.18 (GHSA-74fm-fwc7-3fwp).
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.