fix(deps): update dependency hono to v4.10.2 [security] #3880
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.9.6
->4.10.2
GitHub Vulnerability Alerts
CVE-2025-59139
Summary
A flaw in the
bodyLimit
middleware could allow bypassing the configured request body size limit when conflicting HTTP headers were present.Details
The middleware previously prioritized the
Content-Length
header even when aTransfer-Encoding: chunked
header was also included. According to the HTTP specification,Content-Length
must be ignored in such cases. This discrepancy could allow oversized request bodies to bypass the configured limit.Most standards-compliant runtimes and reverse proxies may reject such malformed requests with
400 Bad Request
, so the practical impact depends on the runtime and deployment environment.Impact
If body size limits are used as a safeguard against large or malicious requests, this flaw could allow attackers to send oversized request bodies. The primary risk is denial of service (DoS) due to excessive memory or CPU consumption when handling very large requests.
Resolution
The implementation has been updated to align with the HTTP specification, ensuring that
Transfer-Encoding
takes precedence overContent-Length
. The issue is fixed in Hono v4.9.7, and all users should upgrade immediately.CVE-2025-62610
Improper Authorization in Hono (JWT Audience Validation)
Hono’s JWT authentication middleware did not validate the
aud
(Audience) claim by default. As a result, applications using the middleware without an explicit audience check could accept tokens intended for other audiences, leading to potential cross-service access (token mix-up).The issue is addressed by adding a new
verification.aud
configuration option to allow RFC 7519–compliant audience validation. This change is classified as a security hardening improvement, but the lack of validation can still be considered a vulnerability in deployments that rely on default JWT verification.Recommended secure configuration
You can enable RFC 7519–compliant audience validation using the new
verification.aud
option:Below is the original description by the reporter. For security reasons, it does not include PoC reproduction steps, as the vulnerability can be clearly understood from the technical description.
The original description by the reporter
Summary
Hono’s JWT Auth Middleware does not provide a built-in
aud
(Audience) verification option, which can cause confused-deputy / token-mix-up issues: an API may accept a valid token that was issued for a different audience (e.g., another service) when multiple services share the same issuer/keys. This can lead to unintended cross-service access. Hono’s docs list verification options foriss/nbf/iat/exp
only, with noaud
support; RFC 7519 requires that when anaud
claim is present, tokens MUST be rejected unless the processing party identifies itself in that claim.Note: This problem likely exists in the JWK/JWKS-based middleware as well (e.g.,
jwk
/verifyWithJwks
)Details
verifyOptions
enumerate onlyiss
,nbf
,iat
, andexp
; there is noaud
option. The same omission appears in the JWT Helper’s “Payload Validation” list. Developers relying on the middleware for complete standards-aligned validation therefore won’t check audience by default.aud
claim; if it does not, the JWT MUST be rejected (whenaud
is present). Lack of a first-classaud
check increases the risk that tokens issued for Service B are accepted by Service A.Impact
Type: Authentication/authorization weakness via token mix-up (confused-deputy).
Who is impacted: Any Hono user who:
aud
.What can happen:
Recommended remediation:
verifyOptions.aud
(string | string[] | RegExp
) to the middleware and enforce RFC 7519 semantics: In verify method, ifaud
is present and does not match with specified audiences, reject.aud
handling exists in the JWK/JWKS flow (jwk
middleware /verifyWithJwks
) so users of external IdPs can enforce audience consistently.Release Notes
honojs/hono (hono)
v4.10.2
Compare Source
v4.10.1
Compare Source
What's Changed
.use
non-return mw fromcreateMiddleware
by @NamesMT in #4465Full Changelog: honojs/hono@v4.10.0...v4.10.1
v4.10.0
Compare Source
Release Notes
Hono v4.10.0 is now available!
This release brings improved TypeScript support and new utilities.
The main highlight is the enhanced middleware type definitions that solve a long-standing issue with type safety for RPC clients.
Middleware Type Improvements
Imagine the following app:
The client with RPC:
Previously, it couldn't infer the responses from middleware, so a type error was thrown.
Now the responses are correctly typed.
This was a long-standing issue and we were thinking it was super difficult to resolve it. But now come true.
Thank you for the great work @slawekkolodziej!
cloneRawRequest Utility
The new
cloneRawRequest
utility allows you to clone the raw Request object after it has been consumed by validators or middleware.Thanks @kamaal111!
New features
All changes
New Contributors
Full Changelog: honojs/hono@v4.9.12...v4.10.0
v4.9.12
Compare Source
What's Changed
PreparedRegExpRouter
for optimization and added tests by @usualoma in #4456tree shaking
by @usualoma in #4458Full Changelog: honojs/hono@v4.9.11...v4.9.12
v4.9.11
Compare Source
What's Changed
New Contributors
Full Changelog: honojs/hono@v4.9.10...v4.9.11
v4.9.10
Compare Source
What's Changed
Full Changelog: honojs/hono@v4.9.9...v4.9.10
v4.9.9
Compare Source
What's Changed
handle
by @yusukebe in #4421New Contributors
Full Changelog: honojs/hono@v4.9.8...v4.9.9
v4.9.8
Compare Source
What's Changed
New Contributors
Full Changelog: honojs/hono@v4.9.7...v4.9.8
v4.9.7
Compare Source
Security
bodyLimit
middleware where the body size limit could be bypassed when bothContent-Length
andTransfer-Encoding
headers were present. If you are using this middleware, please update immediately. Security AdvisoryWhat's Changed
parseResponse
not parsing json in react native by @lr0pb in #4399.tool-versions
file by @3w36zj6 in #4397bun install
commands to use--frozen-lockfile
by @3w36zj6 in #4398New Contributors
Full Changelog: honojs/hono@v4.9.6...v4.9.7
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ 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 was generated by Mend Renovate. View the repository job log.