Skip to main content

Hono serve-static CVE-2026-54286

| EUVDEUVD-2026-38327 MEDIUM
Path Traversal (CWE-22)
2026-06-16 https://github.com/honojs/hono GHSA-wwfh-h76j-fc44
5.9
CVSS 3.1 · Vendor: https://github.com/honojs/hono
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify Windows Hono deployment with serve-static
  2. Delivery
    Determine protected static path prefix (e.g., /admin/)
  3. Exploit
    Craft GET request with %5C-encoded backslash (e.g., /admin%5Csecret.txt)
  4. Execution
    Router sees single segment, skips /admin/* middleware
  5. Persist
    serve-static resolves Windows path admin\secret.txt
  6. Impact
    Protected file returned to unauthenticated attacker

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Three specific conditions must all be true simultaneously: (1) the Hono application must be running on a Windows host - the NTFS/Win32 path resolver's treatment of '\' as a separator is the enabling OS behavior; POSIX systems are not affected; (2) the application must use Hono's serve-static middleware to serve files from a static root directory; and (3) access control for a subdirectory of that static root must be enforced exclusively via prefix-mounted middleware (e.g., app.use('/admin/*', authMiddleware)) rather than through explicit route handlers that call next() only after authorizing the request. The CVSS vector PR:N confirms no authentication is required from the attacker's side - the attack is fully unauthenticated. What limits exploitation is the Windows-only platform constraint and the requirement that sensitive files reside under the static root with protection delegated to middleware: applications that serve protected files via explicit route handlers, or that do not run on Windows, are not affected.

Impact

The CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N) scores at 5.9 Medium. The High complexity rating (AC:H) reflects the non-default conditions required: deployment must be on a Windows host, and the application must use prefix-mounted middleware to guard a static subtree - a configuration that is idiomatic for auth-gated routes but not universal. Where those conditions do exist, the attack itself is trivially simple: a single crafted HTTP GET request with no authentication needed (PR:N), making it low-friction for any attacker who identifies an applicable target. The confidentiality impact is bounded - disclosure is limited to the configured static root, not arbitrary filesystem access - but files in a middleware-guarded path are by definition intended to be access-controlled, which can include sensitive documents, admin pages, or internal resources. No EPSS data was provided in the intelligence feed; given the lack of KEV listing and no identified public exploit code, opportunistic mass exploitation appears unlikely at this time, but targeted exploitation is straightforward once a vulnerable Windows Hono deployment is identified. The primary limiting factor is the Windows-only platform requirement: Linux/macOS deployments of Hono are not affected because POSIX resolvers do not treat '\' as a separator. Security teams should prioritize environments where Hono's serve-static serves sensitive files behind middleware-enforced access control on Windows.

Exploit ScenarioDerived

An attacker identifies a Hono-based application running on a Windows server that uses serve-static to expose an 'admin' directory and relies on a prefix-mounted middleware (e.g., a JWT authentication guard on '/admin/*') to restrict access. The attacker sends a single HTTP GET request for '/admin%5Csecret.txt' - the router treats this as one segment, the auth middleware never fires, and serve-static resolves 'admin\secret.txt' on the Windows filesystem and returns the file contents directly. No credentials, session tokens, or prior reconnaissance beyond knowing the target filename are required.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 16, 2026

Static file disclosure in Hono's serve-static middleware on Windows allows unauthenticated remote attackers to read files protected behind prefix-mounted middleware by submitting a URL-encoded backslash (%5C) in the request path. Hono versions prior to 4.12.25 are affected when deployed on Windows using the Node, Bun, or Deno adapters with an auth or access-control middleware guarding a static subtree. No public exploit or CISA KEV listing has been identified at time of analysis, but the attack primitive is trivially constructable from the public advisory.

RemediationAI

Upgrade Hono to version 4.12.25 or later; this is the vendor-confirmed fixed release per the GitHub Security Advisory GHSA-wwfh-h76j-fc44 (https://github.com/honojs/hono/security/advisories/GHSA-wwfh-h76j-fc44). For teams unable to upgrade immediately, a targeted workaround is to add explicit middleware or a custom request hook that normalizes incoming URL paths by decoding percent-encoded characters and rejecting or rewriting any path containing a backslash before routing occurs - this eliminates the separator ambiguity before Hono's router tokenizes the path. A simpler interim control is to migrate protected assets out of the static root entirely and serve them through explicit route handlers that perform authorization checks directly, removing the dependency on middleware ordering. Note that simply adding a second middleware layer after serve-static does not help, as the issue is that the protective middleware is bypassed entirely. If files in the guarded path are not legitimately needed by unauthenticated users under any circumstance, restricting the application to non-Windows deployment environments is also an effective workaround with no functional trade-offs for cross-platform teams.

Affected VersionsENISA

hono < 4.12.25

Affected Packages

npm hono fix: 4.12.25

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Hono (pkg:npm/hono) is a lightweight multi-runtime web framework. Its router tokenizes URL paths exclusively on the forward-slash delimiter ('/'), so the encoded sequence %5C (URL encoding for the backslash character '\') survives tokenization as part of a single path segment. Middleware mounted on a glob prefix such as '/admin/*' therefore never intercepts a request for '/admin%5Csecret.txt' - the router sees one opaque segment, not a nested path. The serve-static handler applies its own safety checks that correctly block dot-dot traversal ('..') and consecutive separators, but does not normalize or reject a lone backslash before passing the path to the underlying OS file resolver. On Windows, the NTFS/Win32 path resolver treats backslash as a canonical directory separator, so 'admin\secret.txt' resolves identically to 'admin/secret.txt' within the configured static root. The result is that files inside the middleware-guarded subtree are served without the protective middleware ever executing. CWE-22 (Improper Limitation of a Pathname to a Restricted Directory - Path Traversal) captures this root cause: insufficient normalization of platform-specific alternate separator characters before path resolution. Directory escape beyond the static root is not possible because the remaining guard logic blocks '..' sequences.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/honojs/hono) PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 5.9 MEDIUM

AC:H reflects the Windows-only platform requirement and the need for prefix-mounted middleware guarding a static subtree; confidentiality impact is High but integrity and availability are unaffected.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/honojs/hono).

CVSS VectorVendor: https://github.com/honojs/hono

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

DescriptionCVE.org

Summary

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.

Details

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.

Impact

An unauthenticated attacker can read static files under a middleware-guarded prefix on Windows hosts. The read stays within the configured root; escape outside the root is not possible.

Threat Intelligence Overview

EPSS Score
0.3%
Top 79% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy