REDHAT-BUG-2550544: Medium severity npm/hono vulnerability
Hono from 4.12.4 before 4.13.11 contains a middleware bypass vulnerability in serveStatic that allows unauthenticated attackers to skip prefix middleware by exploiting double path decoding. Attackers can send malformed percent-encoded paths that the router matches in encoded form, reaching static files without authentication checks running.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.13.11
Event History
Frequently Asked Questions
Which deployments are exposed?
Deployments using Hono versions from 4.12.4 up to, but not including, 4.13.11 are exposed when serveStatic is used behind prefix middleware intended to enforce authentication or other access checks.
What does an attacker need to exploit this issue?
An attacker can be unauthenticated and needs to send a malformed percent-encoded path that is matched by the router in encoded form and then decoded again, allowing the request to reach static files without the prefix middleware running.
How can I identify potentially affected request paths?
Review requests to static-file routes for malformed or double-encoded percent-encoded path components, especially where those routes rely on prefix middleware for authentication.