Update npm package hono to v4.12.34 [SECURITY] - #408
Update npm package hono to v4.12.34 [SECURITY]#408hash-dependencies[bot] wants to merge 1 commit into
hono to v4.12.34 [SECURITY]#408Conversation
PR SummaryLow Risk Overview This is a security-driven dependency bump (Renovate targets at least 4.12.27 for published fixes). The upgraded line addresses SSR Reviewed by Cursor Bugbot for commit 870cf72. Bugbot is set up for automated code reviews on this repo. Configure here. |
Dependency ReviewThe following issues were found:
Vulnerabilitiespackage-lock.json
OpenSSF Scorecard
Scanned Files
|
14f9da1 to
e49dc53
Compare
e49dc53 to
870cf72
Compare
hono to v4.12.27 [SECURITY]hono to v4.12.34 [SECURITY]
This PR contains the following updates:
4.12.25→4.12.34hono/jsx does not isolate context per request, leading to cross-request data disclosure
CVE-2026-59896 / GHSA-hvrm-45r6-mjfj
More information
Details
Summary
hono/jsxdid not isolate context values per request during server-side rendering. While an async component was suspended onawait, its provided context value stayed observable to other requests rendering concurrently, souseContext()could return a value from a different in-flight request.Details
During server-side rendering, context values were kept in a process-wide structure rather than scoped to each request's render. While an async component awaited, another request entering the same provider could observe or replace the value; when the first render resumed, it could read the other request's context.
This affects the usual ways request-scoped data is passed through a server-rendered JSX tree:
createContext()/useContext()jsxRenderermiddleware anduseRequestContext()It arises only when context is read after an
awaitinside an async component while requests render concurrently. Reading context synchronously (before anyawait), purely synchronous rendering, and client-side (DOM) rendering are not affected.Impact
Under concurrent requests, a response could be rendered with another request's context. A user may receive HTML rendered for a different user, and an authorization check performed after an
awaitmay be evaluated against another user's data.This may lead to:
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Hono: API Gateway v1 adapter can drop a distinct repeated request header value during de-duplication
CVE-2026-59897 / GHSA-xgm2-5f3f-mvvc
More information
Details
Summary
The AWS API Gateway v1 adapter can drop a distinct repeated request header value. When a header appears multiple times, the adapter de-duplicates values using a substring comparison instead of an exact match, so a value that is a substring of another value of the same header is omitted (for example,
203.0.113.1is dropped when another value is203.0.113.10).Details
A repeated request header carries an ordered list of values. Middleware or application logic that depends on the complete list — such as IP restriction that walks the
X-Forwarded-Forchain, rate limiting, audit logging, or proxy-chain validation — can therefore receive incomplete data that differs from what the client actually sent.This issue arises on deployments using the AWS API Gateway v1 adapter (the same pattern also affects the VPC Lattice adapter), for requests that contain the same header more than once.
Impact
An attacker can craft repeated header values so that one value is omitted before the application sees the request. Where a security or routing decision relies on the full chain, this can alter that decision.
This affects applications deployed through Hono's AWS API Gateway v1 (or VPC Lattice) adapter that rely on the complete set of repeated request header values.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Hono: Server-Side XSS via JSX Escaping Bypass in cx() Utility
CVE-2026-59895 / GHSA-w62v-xxxg-mg59
More information
Details
Summary
cx()inhono/csscomposes class names from plain strings but marks the result as already-escaped without HTML-escaping the input. When the result is used as a JSXclassattribute during server-side rendering, the value is written into the attribute unescaped, so untrusted input can break out of theclassattribute and inject arbitrary markup, leading to Cross-Site Scripting (XSS).Details
Because the composed value is treated as pre-escaped, the HTML attribute escaping normally applied to interpolated values is skipped, and characters such as
"pass through unescaped — allowing a value to terminate the attribute and add further attributes or elements. This arises when an application passes untrusted, user-controlled input as a class name tocx(), for example when merging a base class with an externally providedclassName.Impact
During server-side rendering, an attacker who controls a value passed to
cx()can inject arbitrary HTML into the page, resulting in stored or reflected XSS in the victim's browser.This may lead to:
Applications are affected only if they render JSX server-side and pass untrusted input as a class name to
cx().Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Hono: Algorithmic Complexity DoS in Language Middleware
CVE-2026-71848 / GHSA-54fx-42gc-7vw4
More information
Details
Summary
The
languageDetectormiddleware is vulnerable to algorithmic complexity denial of service when processing a crafted language tag containing a large number of hyphen-separated subtags.Details
To implement progressive language-tag truncation,
normalizeLanguage()repeatedly callsparts.slice(0, i).join('-')for every possible prefix. The total amount of string processing grows quadratically with the number of subtags.Language values may come from a query parameter, cookie,
Accept-Languageheader, or URL path, depending on the detector configuration. The default detector order enables query-string, cookie, and header detection, so applications usinglanguageDetector()may expose this processing to unauthenticated requests.Request-size limits reduce the maximum cost of a single request but do not eliminate the issue. Inputs accepted by common JavaScript runtimes can still cause noticeable synchronous event-loop blocking.
Impact
An attacker may repeatedly send requests containing long, hyphen-separated language tags, causing excessive CPU consumption and preventing unrelated requests from being processed.
The practical impact depends on the runtime's request-size limits, reverse-proxy configuration, and the detectors enabled by the application.
Resolution
The progressive lookup should avoid reconstructing every shorter prefix. The implementation can instead inspect the configured supported languages and select the longest value that matches the input at a hyphen boundary.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Hono: Proxy Helper does not remove response headers listed in the
ConnectionheaderCVE-2026-71849 / GHSA-79qm-7rj5-m7r9
More information
Details
Summary
The Proxy Helper (
hono/proxy) does not remove response headers named by the origin'sConnectionheader. Headers that the origin marked as connection-scoped are therefore forwarded to clients.Details
Per RFC 9110 Section 7.6.1, an intermediary must remove the header fields listed in a message's
Connectionheader field before forwarding the message, in addition to the well-known hop-by-hop headers. Theproxy()function removed the well-known hop-by-hop headers (includingConnectionitself) from origin responses, but did not remove the headers that the response'sConnectionheader field designated as connection-scoped.This issue arises when an application proxies responses from an origin that declares additional, non-standard headers as hop-by-hop via the
Connectionresponse header.Impact
A client may receive response headers that the origin intended only for its immediate peer. This may lead to:
This issue affects applications that use the Proxy Helper (
hono/proxy) to forward responses from origins that list custom header names in theirConnectionresponse header. Applications whose origins only use the standard hop-by-hop headers are not affected.Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Hono:
memo()retains SSR output across requests, leading to cross-user data disclosureCVE-2026-71850 / GHSA-f23p-vx2j-j53r
More information
Details
Summary
memo()fromhono/jsxretains the result of a server-side render and reuses it for later renders with comparator-equal props. Request-scoped values read inside the component take no part in that comparison, so a response can contain HTML rendered for another user's request.Details
Components wrapped with
memo()are compared by props alone. Values read implicitly during rendering do not participate: JSX Context throughcreateContext()anduseContext(),useRequestContext()fromhono/jsx-renderer, andgetContext()fromhono/context-storage. The retained result lives as long as the wrapped component, so it outlives the request that produced it.Per-request context isolation is not what fails: the current request's values are established correctly, but the memoized component is skipped before anything reads them.
This issue arises when a component wrapped in
memo()obtains user- or request-specific data from an ambient context instead of through props.Impact
A user may receive a response containing HTML rendered for another user, when both render the same memoized component with comparator-equal props on the same warm instance.
This may lead to:
Exploitation depends on the order in which renders populate the retained value and on both requests reaching the same warm instance.
This issue affects applications that render with
hono/jsxon the server and wrap a component reading ambient request state inmemo(). Applications that pass all request-specific values through props, or that do not usememo(), are unaffected. Client-side rendering is unaffected.Severity
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
honojs/hono (hono)
v4.12.34Compare Source
Security fixes
This release includes fixes for the following security issues:
memo()retains SSR output across requests, leading to cross-user data disclosureAffects:
hono/jsx(server-side rendering). Fixesmemo()reusing a retained render result across requests when props compare equal, where a component reading request-scoped values from ambient context —useContext(),useRequestContext(), orgetContext()— could serve HTML rendered for another user's request, disclosing account data or request-scoped secrets such as CSRF tokens. GHSA-f23p-vx2j-j53rReDoS in CORS middleware via
Access-Control-Request-HeadersAffects:
hono/cors. Fixes a whitespace-tolerant regular expression with quadratic backtracking used to parse theAccess-Control-Request-Headerspreflight header whenallowHeadersis not configured (the default), where a single preflight request carrying a long whitespace run could consume seconds of CPU and stall request processing. GHSA-8j4g-w8fx-2239Algorithmic complexity DoS in Language Middleware
Affects:
hono/language. Fixes quadratic string processing in language-tag normalization, where a crafted language tag with a large number of hyphen-separated subtags — supplied via a query parameter, cookie, orAccept-Languageheader — could cause excessive CPU consumption and block the event loop. GHSA-54fx-42gc-7vw4Proxy Helper does not remove response headers listed in the
ConnectionheaderAffects:
hono/proxy. Fixesproxy()forwarding response headers that the origin'sConnectionheader designates as connection-scoped, where headers intended only for the immediate peer — per RFC 9110 Section 7.6.1 — could be exposed to clients, disclosing connection-scoped or internal metadata. GHSA-79qm-7rj5-m7r9Users who use
hono/jsxfor server-side rendering,hono/cors,hono/language, orhono/proxyare strongly encouraged to upgrade to this version.v4.12.33Compare Source
What's Changed
@hono/node-serverin #5167Full Changelog: honojs/hono@v4.12.32...v4.12.33
v4.12.32Compare Source
What's Changed
Object.create(null)when parsing query, headers, and params in #5161Full Changelog: honojs/hono@v4.12.31...v4.12.32
v4.12.31Compare Source
What's Changed
@ts-expect-errorby @yusukebe in #5130parseBody()by @yusukebe in #5131cloneRawRequestby @yusukebe in #51330by @yusukebe in #5135Full Changelog: honojs/hono@v4.12.30...v4.12.31
v4.12.30Compare Source
What's Changed
Full Changelog: honojs/hono@v4.12.29...v4.12.30
v4.12.29Compare Source
What's Changed
compatibilityDateby @yusukebe in #5100*as a match by @yusukebe in #5084New Contributors
Full Changelog: honojs/hono@v4.12.28...v4.12.29
v4.12.28Compare Source
What's Changed
*.tsbuildinfoby @yusukebe in #5066devDependenciesby @yusukebe in #5085New Contributors
Full Changelog: honojs/hono@v4.12.27...v4.12.28
v4.12.27Compare Source
Security fixes
This release includes fixes for the following security issues:
hono/jsx does not isolate context per request
Affects:
hono/jsx,hono/jsx-renderer. During SSR, context was stored process-wide instead of per request, souseContext()/useRequestContext()read after anawaitin an async component could return another concurrent request's value — leading to cross-request data disclosure or authorization checks against the wrong request. GHSA-hvrm-45r6-mjfjServer-Side XSS via JSX escaping bypass in cx()
Affects:
hono/css.cx()marked its composed class name as already-escaped without escaping the input, so untrusted input passed as a class name could break out of the JSXclassattribute during SSR and inject markup (XSS). GHSA-w62v-xxxg-mg59API Gateway v1 adapter can drop a repeated request header value
Affects:
hono/aws-lambda. The API Gateway v1 (and VPC Lattice) adapter de-duplicated repeated header values by substring instead of exact match, dropping a value that is a substring of another (e.g.203.0.113.1dropped when203.0.113.10is present) — affecting logic such asX-Forwarded-For-based IP restriction. GHSA-xgm2-5f3f-mvvcUsers of
hono/jsx/hono/jsx-renderer,hono/css(cx()), or thehono/aws-lambdaAPI Gateway v1 / VPC Lattice adapters are encouraged to upgrade.v4.12.26Compare Source
What's Changed
Full Changelog: honojs/hono@v4.12.25...v4.12.26
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.