CVE-2026-39406
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-39406 is a middleware bypass vulnerability in @hono/node-server (the Node.js adapter for the Hono web framework) caused by inconsistent path handling in the serveStatic middleware. By prepending repeated slashes (e.g., //) to a request path, an unauthenticated attacker can bypass route-based middleware authorization and access protected static files. All versions of @hono/node-server prior to 1.19.13 are affected. The vulnerability was published on April 7–8, 2026, and carries a CVSS v3.1 base score of 5.3 (Medium) (Github Advisory, Hono Advisory).

Technical details

The root cause is a path normalization inconsistency (CWE-22 – Path Traversal) between the Hono router and the serveStatic handler. The router evaluates the raw request path for middleware matching, so a pattern like /admin/* will match /admin/secret.txt but fail to match //admin/secret.txt. However, serveStatic normalizes the path before resolving the file, treating //admin/secret.txt as equivalent to /admin/secret.txt and serving the file successfully. The fix, applied in commit 025c30f, updates the path validation regex in src/serve-static.ts from one that only blocked .. traversal sequences to one that also rejects paths containing consecutive slashes ([/\]{2,}), causing such requests to return a 404 (Hono Advisory, Fix Commit).

Impact

Successful exploitation allows an unauthenticated remote attacker to read static files that are intended to be protected by route-based middleware, such as authentication or authorization guards. The confidentiality impact is limited to files served under the static root directory; integrity and availability are not affected. Applications that rely solely on serveStatic combined with route-based middleware for access control are at risk of exposing sensitive configuration files, credentials, or other protected content (Github Advisory).

Exploitability

No public exploit code or active in-the-wild exploitation has been reported for this vulnerability. The EPSS score is approximately 0.019% (6th percentile), indicating a low near-term exploitation probability (Github Advisory). The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires no privileges or user interaction and is trivially reproducible by any attacker who can send HTTP requests to a vulnerable server.

Exploitation steps

  1. Reconnaissance: Identify web applications built on @hono/node-server versions prior to 1.19.13 that use serveStatic with route-based middleware (e.g., /admin/*) for access control.
  2. Probe for protected paths: Attempt a normal request to a suspected protected path, e.g., GET /admin/secret.txt, and observe a 401/403 response indicating middleware enforcement.
  3. Craft bypass request: Prepend one or more extra slashes to the path to bypass the router's middleware matching: GET //admin/secret.txt.
  4. Receive protected file: The serveStatic handler normalizes the path and serves the file, returning its contents with a 200 response, bypassing the authorization middleware entirely (Hono Advisory, Fix Commit).

Indicators of compromise

  • Network: HTTP GET requests to static file paths prefixed with repeated slashes (e.g., GET //admin/secret.txt, GET ///protected/config.json) returning HTTP 200 responses instead of 401/403.
  • Logs: Web server or application access logs showing requests with double or multiple leading slashes in the URL path that result in successful (2xx) responses to paths normally protected by middleware.
  • Application Behavior: Unexpected 200 responses for paths that should be gated by authentication or authorization middleware when accessed with //-prefixed URLs.

Mitigation and workarounds

Upgrade @hono/node-server to version 1.19.13 or later, which resolves the inconsistency by rejecting paths containing consecutive slashes in serveStatic (v1.19.13 Release). As a temporary workaround, implement access control at the file-serving layer itself (e.g., using a custom middleware that normalizes paths before routing) rather than relying solely on route-pattern matching. IBM has also issued advisories for affected products including Cloud Pak for AIOps, App Connect Enterprise Certified Container, watsonx Orchestrate Developer Edition, and IBM Bob, and users of those products should apply the relevant IBM patches (IBM CloudPak Advisory, IBM ACE Advisory).

Community reactions

The advisory was published by Hono maintainer yusukebe on April 7, 2026, and the fix was released the same day. IBM subsequently issued multiple advisories acknowledging the impact on several of its products that bundle @hono/node-server. No significant broader media coverage or notable researcher commentary beyond the GitHub advisory and IBM vendor bulletins has been identified (Github Advisory, IBM CloudPak Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-63376HIGH8.2
  • JavaScript logoJavaScript
  • trigger-dev
NoYesSep 03, 2026
GHSA-7q9c-hpx7-9cwmHIGH7.5
  • JavaScript logoJavaScript
  • @typespec/spector
NoYesSep 04, 2026
CVE-2026-77465HIGH7.5
  • JavaScript logoJavaScript
  • cockpit-image-builder.src
NoYesSep 03, 2026
CVE-2026-71429MEDIUM6.2
  • JavaScript logoJavaScript
  • stream-json
NoYesSep 03, 2026
GHSA-6hxq-p678-4hr2LOW2
  • JavaScript logoJavaScript
  • @simplewebauthn/server
NoYesSep 04, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management