---
id: "CVE-2026-118663"
kind: "vulnerability"
aliases: ["CVE-2026-118663", "GHSA-rmxm-3fg6-px4f"]
title: "@hono/node-server: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths"
severity: "medium"
cvss: 5.3
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "@hono/node-server", "fixed": ["2.1.3"], "affected": ">= 1.19.10, < 2.1.3", "ecosystem": "npm"}]
ecosystems: ["npm"]
tags: ["cwe-174", "hono", "node", "package", "self-hosted"]
not_affected_if: ["no-middleware-on-static-prefix", "static-only-public-files"]
published_at: "2026-10-28T21:05:00+00:00"
first_seen_at: "2026-10-28T21:07:44+00:00"
updated_at: "2026-10-28T21:09:30+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-rmxm-3fg6-px4f", "first_seen_at": "2026-10-28T21:07:44+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-118663", "first_seen_at": "2026-10-28T21:35:45+00:00"}]
---

# @hono/node-server: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths

The serveStatic helper in @hono/node-server decodes the request path a second time after routing, so a crafted percent-encoded path can be routed as one path and served as another. An unauthenticated attacker can reach a static file without the middleware mounted on its prefix (such as an auth check) running.

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

## Affected

- npm:@hono/node-server affected >= 1.19.10, < 2.1.3 fixed 2.1.3

## How to check

- Run `npm ls @hono/node-server` to find the installed version and whether it is between `1.19.10` and `2.1.3`.
- Search the app for `serveStatic` and check whether any middleware is mounted on a prefix that `serveStatic` also serves.

## Fix

- Upgrade `@hono/node-server` to `2.1.3`.

## Timeline

- 2026-10-28T21:07:44+00:00 ghsa https://github.com/advisories/GHSA-rmxm-3fg6-px4f
- 2026-10-28T21:35:45+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-118663

## 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_
