Visitar URL original
@hono/node-server: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths · CVE-2026-118663 · GitHub Advisory Database · GitHub
Skip to content

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

Moderate severity GitHub Reviewed Published Sep 29, 2026 in honojs/node-server • Updated Oct 28, 2026

Package

npm @hono/node-server (npm)

Affected versions

>= 1.19.10, < 2.1.3

Patched versions

2.1.3

Description

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.

References

@yusukebe yusukebe published to honojs/node-server Sep 29, 2026
Published to the GitHub Advisory Database Oct 28, 2026
Reviewed Oct 28, 2026
Last updated Oct 28, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(29th percentile)

Weaknesses

Double Decoding of the Same Data

The product decodes the same input twice. Learn more on MITRE.

CVE ID

CVE-2026-118663

GHSA ID

GHSA-rmxm-3fg6-px4f

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.