fix(deps): update dependency hono to v4.12.34 [security] - #285
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.12.33→4.12.34Hono: ReDoS in CORS middleware via Access-Control-Request-Headers
CVE-2026-69207 / GHSA-8j4g-w8fx-2239
More information
Details
Summary
The built-in CORS middleware (
hono/cors) parses the attacker-controlledAccess-Control-Request-Headersrequest header during a preflight (OPTIONS) request using a regular expression whose running time is quadratic in the input length. A single request carrying a long run of whitespace can consume seconds of CPU, and repeated requests can render the service unresponsive. This parsing runs under the default configuration.Details
On a CORS preflight, when
allowHeadersis not configured - the default - the middleware reflects and parses theAccess-Control-Request-Headersvalue. The parser used a whitespace-tolerant regular expression whose backtracking makes the work grow quadratically (O(n²)) with the length of the value when it contains a long whitespace sequence without a delimiter.Because the header value is bounded only by the deployment's maximum HTTP header size, a single preflight can block request processing for a noticeable amount of time; on runtimes that share one execution thread across requests, this stalls concurrent requests as well. No authentication, special origin, or user interaction is required.
This issue arises for any application using
cors()with the default (or an empty)allowHeaders. Applications that set a non-emptyallowHeadersdo not reach the affected path.Impact
An unauthenticated attacker can send preflight requests that each consume disproportionate CPU relative to their size, degrading or denying service. This is a denial-of-service issue only; it does not expose or modify data.
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).
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.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, 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.