hono

Ecosystem: npm

Downloads: 391.73 Mln

Vulnerabilities from the last (months)
  • 0CriticalAffects 0 versions
  • 7HighAffects 7 versions
  • 0MediumAffects 0 versions
  • 48ModerateAffects 48 versions
  • 6LowAffects 6 versions
Severity distribution (all time)
61vulnerabilities
  • Critical0 (0.0%)
  • High7 (11.5%)
  • Medium0 (0.0%)
  • Moderate48 (78.7%)
  • Low6 (9.8%)

Monthly breakdown

  • Critical
  • High
  • Medium
  • Moderate
  • Low
  • 5 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 4
    • Low: 1
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 5 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 4
    • Low: 1
  • 4 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 3
    • Low: 1
  • 5 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 5
    • Low: 0
  • 10 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 9
    • Low: 0
  • 5 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 4
    • Low: 1
  • 6 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 6
    • Low: 0
  • 4 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 3
    • Low: 0
  • 2 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 0
    • Low: 1
  • 6 vulnerabilities
    • Critical: 0
    • High: 2
    • Medium: 0
    • Moderate: 4
    • Low: 0
  • 2 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 2 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 0
    • Low: 1
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 1
    • Low: 0

Vulnerabilities (61)

Known vulnerabilities affecting hono, based on data from OSV.

Vulnerabilities affecting hono
IDSeveritySummaryAffected versionsPublishedSource
GHSA-3gg2-335m-rxc6LowHono: `css` helper does not escape a closing tag split between the template and an interpolated value, allowing HTML injection### Summary The `css` helper in `hono/css` escapes a `/` that follows `<` inside an interpolated value so that a value cannot close the `<style>` element. The check only looks inside each value. When the text before a value ends with `<`, whether that is the template itself or an earlier interpolated value, and the next value starts with `/`, the `/` is not escaped and the combined output contains an unescaped closing tag. ### Details Interpolated string values are escaped one at a time before they are joined with the surrounding template text. The rule that neutralizes `</` therefore canno
  • >= 3.12.0, < 4.13.16
GitHub (opens in a new tab)
GHSA-46wx-v44x-9hh2ModerateHono: `csrf()` does not check requests sent by hyperlink auditing (`text/ping`)### Summary `csrf()` validates a request only when its `Content-Type` is one of the three types an HTML form can send. Chromium's hyperlink auditing (`<a ping>`) sends a cross-origin POST with the user's cookies and the content type `text/ping`, which is not in that list. The middleware does not look at `Origin` or `Sec-Fetch-Site` for such a request, so it is passed to the handler. ### Details The middleware skips the origin check when the content type is not one that a form submission produces. The assumption was that any other content type requires a CORS preflight and therefore cannot b
  • < 4.13.16
GitHub (opens in a new tab)
GHSA-4h7h-rv7c-7m2vModerateHono: `validator('form')` skips validation for `multipart/form-data` requests with extra parameters### Summary `validator('form')` only recognizes a `multipart/form-data` `Content-Type` that carries nothing but a single `boundary` parameter. A request with another legal parameter, such as `charset`, or with extra whitespace after the `;` is not recognized as a form. The validation callback then receives an empty object, while `c.req.parseBody()` still parses the body as a form. ### Details The check that decides whether a request body is a form was written as a strict pattern over the whole `Content-Type` value. Any parameter list that does not look exactly like `; boundary=...` fails th
  • >= 4.5.1, < 4.13.16
GitHub (opens in a new tab)
GHSA-4m76-xfj5-7975ModerateHono: `mount()` and `app.mount()` can forward a path that bypasses middleware scoped inside the mount prefix### Summary `mount()` and `app.mount()` remove the mount prefix from the request path and forward the rest to the mounted application. Two mistakes in that step let a crafted request reach a route of the mounted application that the outer application protects with path-scoped middleware, such as an authentication check on `/app/admin/*`. The outer application routes on the original path, so the middleware does not run. ### Details 1. **Dynamic prefix** (all affected versions): for a mount such as `/api/:tenant/*`, the prefix was removed by the length of the route pattern, not of the matched
  • < 4.13.16
GitHub (opens in a new tab)
GHSA-h7mg-cq63-vhpqModerateHono: RegExpRouter skips wildcard middleware for some route sets and for paths with an encoded line terminator### Summary RegExpRouter, which the default `SmartRouter` selects for most applications, skipped wildcard middleware in three cases, so a route handler ran without the middleware registered for it: 1. Middleware whose parameter is written with the explicit default pattern, such as `/api/:tenant{[^/]+}/admin/*`, was not applied to a route written as `/api/:tenant/admin/:id`. (since 4.13.0) 2. Middleware on `/admin/*` was not applied to a route registered on `/admin*` for paths under `/admin/`. (since 4.1.4) 3. For a path with an encoded line terminator (`%0A`, `%0D`, `%E2%80%A8`, `%E2%80%A9`)
  • >= 4.1.4, < 4.13.16
GitHub (opens in a new tab)
GHSA-5r4p-p66f-jhc7ModerateHono: `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
  • >= 4.12.4, < 4.13.11
GitHub (opens in a new tab)
GHSA-hxh3-vqpv-xpqvModeratehono/jsx renders plain strings unescaped in boundary components, leading to XSS### Summary `hono/jsx` does not HTML-escape a plain string placed directly as a child or `fallback` of `Suspense` or `ErrorBoundary`, as the only child of a `Context.Provider`, or as the root value of `renderToString()` / `renderToReadableStream()` from `hono/jsx/dom/server`. Such a string is emitted as markup instead of text. ### Details These paths stringify their input and treat the result as already-escaped HTML, so a plain string passes through unchanged. Notable cases: - `Suspense`: a string child, or a string `fallback` while a child suspends. With streaming, the fallback reaches th
  • < 4.13.7
GitHub (opens in a new tab)
GHSA-6623-4q32-82v8LowDuplicate Advisory: hono/jsx renders plain strings unescaped in boundary components, leading to XSS## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-hxh3-vqpv-xpqv. This link is maintained to preserve external references. ## Original Description hono before 4.13.7 fails to HTML-escape plain strings rendered by hono/jsx as a child or fallback of Suspense, as a string child of ErrorBoundary alongside an asynchronous sibling, as the single child of a Context.Provider, or as the root value passed to renderToString() or renderToReadableStream() from hono/jsx/dom/server. These paths stringify their input and treat the result as already-escaped markup, so a
  • all
GitHub (opens in a new tab)
GHSA-crvj-82cr-hjcxModerateHono: Query parser reads parameters after the URL fragment, causing cache-key and proxy interpretation differentials### Summary Hono's query parsing does not stop at the URL fragment: a `?` appearing after a `#` is treated as the start of a query string. As a result, the application can read request parameters that no other component involved in handling the request can see. ### Details A fragment is never part of the query, and every standard URL consumer — browsers, `new URL()`, reverse proxies — ignores everything from the first `#` onward. Hono's routing followed that rule; its query helpers did not. For one and the same request, this produces an interpretation differential: - A component in front
  • < 4.13.5
GitHub (opens in a new tab)
GHSA-g6gw-c38x-mqfcModerateHono: Unbounded dot-notation nesting in `parseBody()` can cause memory exhaustion### Summary When `parseBody()` expands dot-separated form field names into nested objects, it does not limit the nesting depth or the total number of objects created. A request body well within a normal size limit can therefore allocate an object graph far larger than the request itself, and concurrent requests can exhaust the heap and terminate the process. ### Details Each dot-separated segment of a field name creates an intermediate object. Neither the segments within a single field name nor the total across a request was bounded, and empty segments were preserved, so a field name could
  • < 4.13.5
GitHub (opens in a new tab)
  • GHSA-3gg2-335m-rxc6Low
    Hono: `css` helper does not escape a closing tag split between the template and an interpolated value, allowing HTML injection
    • >= 3.12.0, < 4.13.16

    ### Summary The `css` helper in `hono/css` escapes a `/` that follows `<` inside an interpolated value so that a value cannot close the `<style>` element. The check only looks inside each value. When the text before a value ends with `<`, whether that is the template itself or an earlier interpolated value, and the next value starts with `/`, the `/` is not escaped and the combined output contains an unescaped closing tag. ### Details Interpolated string values are escaped one at a time before they are joined with the surrounding template text. The rule that neutralizes `</` therefore canno

    CVE: CVE-2026-126359

  • GHSA-46wx-v44x-9hh2Moderate
    Hono: `csrf()` does not check requests sent by hyperlink auditing (`text/ping`)
    • < 4.13.16

    ### Summary `csrf()` validates a request only when its `Content-Type` is one of the three types an HTML form can send. Chromium's hyperlink auditing (`<a ping>`) sends a cross-origin POST with the user's cookies and the content type `text/ping`, which is not in that list. The middleware does not look at `Origin` or `Sec-Fetch-Site` for such a request, so it is passed to the handler. ### Details The middleware skips the origin check when the content type is not one that a form submission produces. The assumption was that any other content type requires a CORS preflight and therefore cannot b

    CVE: CVE-2026-126355

  • GHSA-4h7h-rv7c-7m2vModerate
    Hono: `validator('form')` skips validation for `multipart/form-data` requests with extra parameters
    • >= 4.5.1, < 4.13.16

    ### Summary `validator('form')` only recognizes a `multipart/form-data` `Content-Type` that carries nothing but a single `boundary` parameter. A request with another legal parameter, such as `charset`, or with extra whitespace after the `;` is not recognized as a form. The validation callback then receives an empty object, while `c.req.parseBody()` still parses the body as a form. ### Details The check that decides whether a request body is a form was written as a strict pattern over the whole `Content-Type` value. Any parameter list that does not look exactly like `; boundary=...` fails th

    CVE: CVE-2026-126356

  • GHSA-4m76-xfj5-7975Moderate
    Hono: `mount()` and `app.mount()` can forward a path that bypasses middleware scoped inside the mount prefix
    • < 4.13.16

    ### Summary `mount()` and `app.mount()` remove the mount prefix from the request path and forward the rest to the mounted application. Two mistakes in that step let a crafted request reach a route of the mounted application that the outer application protects with path-scoped middleware, such as an authentication check on `/app/admin/*`. The outer application routes on the original path, so the middleware does not run. ### Details 1. **Dynamic prefix** (all affected versions): for a mount such as `/api/:tenant/*`, the prefix was removed by the length of the route pattern, not of the matched

    CVE: CVE-2026-126357

  • GHSA-h7mg-cq63-vhpqModerate
    Hono: RegExpRouter skips wildcard middleware for some route sets and for paths with an encoded line terminator
    • >= 4.1.4, < 4.13.16

    ### Summary RegExpRouter, which the default `SmartRouter` selects for most applications, skipped wildcard middleware in three cases, so a route handler ran without the middleware registered for it: 1. Middleware whose parameter is written with the explicit default pattern, such as `/api/:tenant{[^/]+}/admin/*`, was not applied to a route written as `/api/:tenant/admin/:id`. (since 4.13.0) 2. Middleware on `/admin/*` was not applied to a route registered on `/admin*` for paths under `/admin/`. (since 4.1.4) 3. For a path with an encoded line terminator (`%0A`, `%0D`, `%E2%80%A8`, `%E2%80%A9`)

    CVE: CVE-2026-126358

  • GHSA-5r4p-p66f-jhc7Moderate
    Hono: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths
    • >= 4.12.4, < 4.13.11

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

  • GHSA-hxh3-vqpv-xpqvModerate
    hono/jsx renders plain strings unescaped in boundary components, leading to XSS
    • < 4.13.7

    ### Summary `hono/jsx` does not HTML-escape a plain string placed directly as a child or `fallback` of `Suspense` or `ErrorBoundary`, as the only child of a `Context.Provider`, or as the root value of `renderToString()` / `renderToReadableStream()` from `hono/jsx/dom/server`. Such a string is emitted as markup instead of text. ### Details These paths stringify their input and treat the result as already-escaped HTML, so a plain string passes through unchanged. Notable cases: - `Suspense`: a string child, or a string `fallback` while a child suspends. With streaming, the fallback reaches th

    CVE: CVE-2026-93981

  • GHSA-6623-4q32-82v8Low
    Duplicate Advisory: hono/jsx renders plain strings unescaped in boundary components, leading to XSS
    • all

    ## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-hxh3-vqpv-xpqv. This link is maintained to preserve external references. ## Original Description hono before 4.13.7 fails to HTML-escape plain strings rendered by hono/jsx as a child or fallback of Suspense, as a string child of ErrorBoundary alongside an asynchronous sibling, as the single child of a Context.Provider, or as the root value passed to renderToString() or renderToReadableStream() from hono/jsx/dom/server. These paths stringify their input and treat the result as already-escaped markup, so a

  • GHSA-crvj-82cr-hjcxModerate
    Hono: Query parser reads parameters after the URL fragment, causing cache-key and proxy interpretation differentials
    • < 4.13.5

    ### Summary Hono's query parsing does not stop at the URL fragment: a `?` appearing after a `#` is treated as the start of a query string. As a result, the application can read request parameters that no other component involved in handling the request can see. ### Details A fragment is never part of the query, and every standard URL consumer — browsers, `new URL()`, reverse proxies — ignores everything from the first `#` onward. Hono's routing followed that rule; its query helpers did not. For one and the same request, this produces an interpretation differential: - A component in front

    CVE: CVE-2026-84363

  • GHSA-g6gw-c38x-mqfcModerate
    Hono: Unbounded dot-notation nesting in `parseBody()` can cause memory exhaustion
    • < 4.13.5

    ### Summary When `parseBody()` expands dot-separated form field names into nested objects, it does not limit the nesting depth or the total number of objects created. A request body well within a normal size limit can therefore allocate an object graph far larger than the request itself, and concurrent requests can exhaust the heap and terminate the process. ### Details Each dot-separated segment of a field name creates an intermediate object. Neither the segments within a single field name nor the total across a request was bounded, and empty segments were preserved, so a field name could

    CVE: CVE-2026-84364

Showing 1-10 of 61 vulnerabilities