hono-node-server

Ecosystem: npm

Downloads: 316.98 Mln

Vulnerabilities from the last (months)
  • 0CriticalAffects 0 versions
  • 2HighAffects 2 versions
  • 0MediumAffects 0 versions
  • 5ModerateAffects 6 versions
  • 0LowAffects 0 versions
Severity distribution (all time)
7vulnerabilities
  • Critical0 (0.0%)
  • High2 (28.6%)
  • Medium0 (0.0%)
  • Moderate5 (71.4%)
  • Low0 (0.0%)

Monthly breakdown

  • Critical
  • High
  • Medium
  • Moderate
  • Low
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 2 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 2
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 0
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 0
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0

Vulnerabilities (7)

Known vulnerabilities affecting hono-node-server, based on data from OSV.

Vulnerabilities affecting hono-node-server
IDSeveritySummaryAffected versionsPublishedSource
GHSA-rmxm-3fg6-px4fModerate@hono/node-server: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths### 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 insid
  • >= 1.19.10, < 2.1.3
GitHub (opens in a new tab)
GHSA-9mqv-5hh9-4cggModerateNode.js Adapter for Hono: Unauthenticated memory-leak DoS via aborted WebSocket handshake## Summary A WebSocket upgrade request to an `upgradeWebSocket` route with a missing or malformed `Sec-WebSocket-Key` header leaks memory permanently. The request's `IncomingMessage` is retained in an internal map and a pending promise is never settled, even though no connection is established. Since the route is reachable pre-handshake without authentication, an unauthenticated attacker can flood it to gradually exhaust memory. ## Details The built-in WebSocket helper cleans up its internal map only on a successful handshake or when the route guard rejects the request. When `ws` aborts the
  • >= 2.0.0, < 2.0.10
GitHub (opens in a new tab)
GHSA-frvp-7c67-39w9ModerateNode.js Adapter for Hono: Path traversal in `serve-static` on Windows via encoded backslash (`%5C`)The same as the `hono` core [Path traversal in `serve-static` on Windows via encoded backslash (`%5C`)](https://github.com/honojs/hono/security/advisories/GHSA-wwfh-h76j-fc44). ### 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. ### Detai
  • >= 2.0.0, < 2.0.5
  • < 1.19.15
GitHub (opens in a new tab)
GHSA-92pp-h63x-v22mModerate@hono/node-server: Middleware bypass via repeated slashes in serveStatic## Summary A path handling inconsistency in `serveStatic` allows protected static files to be accessed by using repeated slashes (`//`) in the request path. When route-based middleware (e.g., `/admin/*`) is used for authorization, the router may not match paths containing repeated slashes, while `serveStatic` resolves them as normalized paths. This can lead to a middleware bypass. ## Details The routing layer and `serveStatic` handle repeated slashes differently. For example: - `/admin/secret.txt` => matches `/admin/*` - `//admin/secret.txt` => may not match `/admin/*` This inconsistenc
  • < 1.19.13
GitHub (opens in a new tab)
GHSA-wc8c-qw6v-h7f6High@hono/node-server has authorization bypass for protected static paths via encoded slashes in Serve Static Middleware## Summary When using @hono/node-server's static file serving together with route-based middleware protections (e.g. protecting `/admin/*`), inconsistent URL decoding can allow protected static resources to be accessed without authorization. In particular, paths containing encoded slashes (`%2F`) may be evaluated differently by routing/middleware matching versus static file path resolution, enabling a bypass where middleware does not run but the static file is still served. ## Details The routing layer and the node-server static handler normalize request paths differently. The router prese
  • < 1.19.10
GitHub (opens in a new tab)
GHSA-hgxw-5xg3-69jxHigh@hono/node-server has Denial of Service risk when receiving Host header that cannot be parsed### Impact The application hangs when receiving a Host header with a value that `@hono/node-server` can't handle well. Invalid values are those that cannot be parsed by the `URL` as a hostname such as an empty string, slashes `/`, and other strings. For example, if you have a simple application: ```ts import { serve } from '@hono/node-server' import { Hono } from 'hono' const app = new Hono() app.get('/', (c) => c.text('Hello')) serve(app) ``` Sending a request with a Host header with an empty value to it: ``` curl localhost:3000/ -H "Host: " ``` The results: ``` node:internal/url:77
  • >= 1.3.0, < 1.10.1
GitHub (opens in a new tab)
GHSA-rjq5-w47x-x359Moderate@hono/node-server cannot handle "double dots" in URL### Impact Since v1.3.0, we use our own Request object. This is great, but the `url` behavior is unexpected. In the standard API, if the URL contains `..`, here called "double dots", the URL string returned by Request will be in the resolved path. ```ts const req = new Request('http://localhost/static/../foo.txt') // Web-standards console.log(req.url) // http://localhost/foo.txt ``` However, the `url` in our Request does not resolve double dots, so `http://localhost/static/.. /foo.txt` is returned. ```ts const req = new Request('http://localhost/static/../foo.txt') console.log(req.url) //
  • >= 1.3.0, < 1.4.1
GitHub (opens in a new tab)
  • GHSA-rmxm-3fg6-px4fModerate
    @hono/node-server: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths
    • >= 1.19.10, < 2.1.3

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

    CVE: CVE-2026-118663

  • GHSA-9mqv-5hh9-4cggModerate
    Node.js Adapter for Hono: Unauthenticated memory-leak DoS via aborted WebSocket handshake
    • >= 2.0.0, < 2.0.10

    ## Summary A WebSocket upgrade request to an `upgradeWebSocket` route with a missing or malformed `Sec-WebSocket-Key` header leaks memory permanently. The request's `IncomingMessage` is retained in an internal map and a pending promise is never settled, even though no connection is established. Since the route is reachable pre-handshake without authentication, an unauthenticated attacker can flood it to gradually exhaust memory. ## Details The built-in WebSocket helper cleans up its internal map only on a successful handshake or when the route guard rejects the request. When `ws` aborts the

    CVE: CVE-2026-73565

  • GHSA-frvp-7c67-39w9Moderate
    Node.js Adapter for Hono: Path traversal in `serve-static` on Windows via encoded backslash (`%5C`)
    • >= 2.0.0, < 2.0.5
    • < 1.19.15

    The same as the `hono` core [Path traversal in `serve-static` on Windows via encoded backslash (`%5C`)](https://github.com/honojs/hono/security/advisories/GHSA-wwfh-h76j-fc44). ### 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. ### Detai

  • GHSA-92pp-h63x-v22mModerate
    @hono/node-server: Middleware bypass via repeated slashes in serveStatic
    • < 1.19.13

    ## Summary A path handling inconsistency in `serveStatic` allows protected static files to be accessed by using repeated slashes (`//`) in the request path. When route-based middleware (e.g., `/admin/*`) is used for authorization, the router may not match paths containing repeated slashes, while `serveStatic` resolves them as normalized paths. This can lead to a middleware bypass. ## Details The routing layer and `serveStatic` handle repeated slashes differently. For example: - `/admin/secret.txt` => matches `/admin/*` - `//admin/secret.txt` => may not match `/admin/*` This inconsistenc

    CVE: CVE-2026-39406

  • GHSA-wc8c-qw6v-h7f6High
    @hono/node-server has authorization bypass for protected static paths via encoded slashes in Serve Static Middleware
    • < 1.19.10

    ## Summary When using @hono/node-server's static file serving together with route-based middleware protections (e.g. protecting `/admin/*`), inconsistent URL decoding can allow protected static resources to be accessed without authorization. In particular, paths containing encoded slashes (`%2F`) may be evaluated differently by routing/middleware matching versus static file path resolution, enabling a bypass where middleware does not run but the static file is still served. ## Details The routing layer and the node-server static handler normalize request paths differently. The router prese

    CVE: CVE-2026-29087

  • GHSA-hgxw-5xg3-69jxHigh
    @hono/node-server has Denial of Service risk when receiving Host header that cannot be parsed
    • >= 1.3.0, < 1.10.1

    ### Impact The application hangs when receiving a Host header with a value that `@hono/node-server` can't handle well. Invalid values are those that cannot be parsed by the `URL` as a hostname such as an empty string, slashes `/`, and other strings. For example, if you have a simple application: ```ts import { serve } from '@hono/node-server' import { Hono } from 'hono' const app = new Hono() app.get('/', (c) => c.text('Hello')) serve(app) ``` Sending a request with a Host header with an empty value to it: ``` curl localhost:3000/ -H "Host: " ``` The results: ``` node:internal/url:77

    CVE: CVE-2024-32652

  • GHSA-rjq5-w47x-x359Moderate
    @hono/node-server cannot handle "double dots" in URL
    • >= 1.3.0, < 1.4.1

    ### Impact Since v1.3.0, we use our own Request object. This is great, but the `url` behavior is unexpected. In the standard API, if the URL contains `..`, here called "double dots", the URL string returned by Request will be in the resolved path. ```ts const req = new Request('http://localhost/static/../foo.txt') // Web-standards console.log(req.url) // http://localhost/foo.txt ``` However, the `url` in our Request does not resolve double dots, so `http://localhost/static/.. /foo.txt` is returned. ```ts const req = new Request('http://localhost/static/../foo.txt') console.log(req.url) //

    CVE: CVE-2024-23340

Showing 1-7 of 7 vulnerabilities