---
id: "CVE-2026-111757"
kind: "vulnerability"
aliases: ["CVE-2026-111757", "GHSA-5r4p-p66f-jhc7"]
title: "Hono: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths"
severity: "medium"
cvss: 5.300000190734863
epss: 0.0022299999836832285
exploited: false
status: "open"
category: "package"
products: [{"name": "hono", "fixed": ["4.13.11"], "affected": ">= 4.12.4, < 4.13.11", "ecosystem": "npm"}]
ecosystems: ["npm"]
tags: ["cwe-174", "edge-runtimes", "hono", "node", "npm", "package"]
not_affected_if: ["hono-4.13.11-or-later", "hono-below-4.12.4", "no-middleware-on-static-prefix", "public-files-only"]
published_at: "2026-10-19T18:17:00+00:00"
first_seen_at: "2026-10-23T19:11:32+00:00"
updated_at: "2026-10-23T21:57:18+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-5r4p-p66f-jhc7", "first_seen_at": "2026-10-23T19:11:32+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-111757", "first_seen_at": "2026-10-23T21:57:18+00:00"}]
---

# Hono: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths

Hono's serveStatic decodes the request path twice, so a crafted percent-encoded path can route past middleware mounted on a static prefix. An unauthenticated attacker can reach static files without, for example, an authentication check running.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- npm:hono affected >= 4.12.4, < 4.13.11 fixed 4.13.11

## How to check

Look for app.use(...) middleware mounted on a path prefix that serveStatic also serves, and check the installed hono version in package-lock.json or node_modules/hono/package.json.

## Fix

Upgrade hono to 4.13.11 or later.

## Timeline

- 2026-10-23T19:11:32+00:00 ghsa https://github.com/advisories/GHSA-5r4p-p66f-jhc7
- 2026-10-23T21:57:18+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-111757

## From the sources

### Summary

`serveStatic` decodes the request path a second time after Hono has already decoded it for routing. A crafted request can be routed as one path and served as another, so middleware mounted on a static prefix does not run for a file under that prefix.

### Details

Hono decodes the request path once before routing. `serveStatic` decoded it again before resolving the file. With a malformed percent-encoded sequence, the first decode leaves part of the path encoded, the router matches the encoded form, and the second decode resolves the real directory. The file is still resolved inside the configured root; this is not a traversal outside it.

### Impact

An unauthenticated attacker may reach static files without the middleware on their prefix running, for example an authentication check. This affects applications that mount middleware on part of the directory served by `serveStatic`. Applications that serve only public files are not affected.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
