All vulnerabilities

npm

GHSA-frvp-7c67-39w9

Node.js Adapter for Hono: Path traversal in `serve-static` on Windows via encoded backslash (`%5C`)

Severity
Medium 5.9
Published
21 Jul 2026
Last changed
10 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
1.19.15, 2.0.5
Weakness
Path traversal (CWE-22)
Attack
Over the network · Only under certain conditions · No login needed · No user action needed
Attacker can
Read data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Sources
OSV.dev and GitHub

Description

The same as the hono core Path traversal in serve-static on Windows via encoded backslash (%5C).

On Windows hosts, an encoded backslash (%5C) in the request path decodes to \, which the Windows path resolver treats as a separator. serve-static then resolves a single URL segment such as admin\secret.txt into a nested file under the root and serves it, letting an attacker read static files meant to be protected behind prefix-mounted middleware. Directory escape (..) remains blocked.

The router splits paths only on /, so /admin%5Csecret.txt is one segment and middleware on /admin/* does not run. The serve-static guard rejects ./.. and consecutive separators but lets a lone \ through; on Windows the file resolver re-splits it into the protected subtree.

This affects Windows hosts serving static files via the Node, Bun, or Deno adapters that guard a static subtree with prefix-mounted middleware.

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

Affected software

SoftwareAffected versions
@hono/node-servernpm · osv:npm:@hono/node-server
  • Every version before 1.19.15
  • From 2.0.0 before 2.0.5

About @hono/node-server

Weekly downloads (npm)
100,106,943npm, 15 Nov 2026

This is the only vulnerability in @hono/node-server in our list.

References