chore(deps): update dependency hono to v4.10.3 [security] #9
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.7.10->4.10.3GitHub Vulnerability Alerts
CVE-2025-59139
Summary
A flaw in the
bodyLimitmiddleware could allow bypassing the configured request body size limit when conflicting HTTP headers were present.Details
The middleware previously prioritized the
Content-Lengthheader even when aTransfer-Encoding: chunkedheader was also included. According to the HTTP specification,Content-Lengthmust 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-Encodingtakes 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.audconfiguration 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.audoption: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/exponly, with noaudsupport; RFC 7519 requires that when anaudclaim 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
verifyOptionsenumerate onlyiss,nbf,iat, andexp; there is noaudoption. 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.audclaim; if it does not, the JWT MUST be rejected (whenaudis present). Lack of a first-classaudcheck 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, ifaudis present and does not match with specified audiences, reject.audhandling exists in the JWK/JWKS flow (jwkmiddleware /verifyWithJwks) so users of external IdPs can enforce audience consistently.GHSA-q7jf-gf43-6x6p
Summary
A flaw in the CORS middleware allowed request
Varyheaders to be reflected into the response, enabling attacker-controlledVaryvalues and potentially affecting cache behavior.Details
The middleware previously copied the
Varyheader from the request whenoriginwas not set to"*". SinceVaryis a response header that should only be managed by the server, this could allow an attacker to influence caching behavior or cause inconsistent CORS handling.Most environments will see impact only when shared caches or proxies rely on the
Varyheader. The practical effect varies by configuration.Impact
May cause cache key pollution and inconsistent CORS enforcement in certain setups. No direct confidentiality, integrity, or availability impact in default configurations.
Resolution
Update to the latest patched release. The CORS middleware has been corrected to handle
Varyexclusively as a response header.Release Notes
honojs/hono (hono)
v4.10.3Compare Source
Securiy Fix
A security issue in the CORS middleware has been fixed. In some cases, a request header could affect the Vary response header. Please update to the latest version if you are using the CORS middleware.
What's Changed
=by @ryuapp in #4478New Contributors
Full Changelog: honojs/hono@v4.10.2...v4.10.3
v4.10.2Compare Source
v4.10.1Compare Source
What's Changed
.usenon-return mw fromcreateMiddlewareby @NamesMT in #4465Full Changelog: honojs/hono@v4.10.0...v4.10.1
v4.10.0Compare 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
cloneRawRequestutility 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.12Compare Source
What's Changed
PreparedRegExpRouterfor optimization and added tests by @usualoma in #4456tree shakingby @usualoma in #4458Full Changelog: honojs/hono@v4.9.11...v4.9.12
v4.9.11Compare Source
What's Changed
New Contributors
Full Changelog: honojs/hono@v4.9.10...v4.9.11
v4.9.10Compare Source
What's Changed
Full Changelog: honojs/hono@v4.9.9...v4.9.10
v4.9.9Compare Source
What's Changed
handleby @yusukebe in #4421New Contributors
Full Changelog: honojs/hono@v4.9.8...v4.9.9
v4.9.8Compare Source
What's Changed
New Contributors
Full Changelog: honojs/hono@v4.9.7...v4.9.8
v4.9.7Compare Source
Security
bodyLimitmiddleware where the body size limit could be bypassed when bothContent-LengthandTransfer-Encodingheaders were present. If you are using this middleware, please update immediately. Security AdvisoryWhat's Changed
parseResponsenot parsing json in react native by @lr0pb in #4399.tool-versionsfile by @3w36zj6 in #4397bun installcommands to use--frozen-lockfileby @3w36zj6 in #4398New Contributors
Full Changelog: honojs/hono@v4.9.6...v4.9.7
v4.9.6Compare Source
Security
Fixed a bug in URL path parsing (
getPath) that could cause path confusion under malformed requests.If you rely on reverse proxies (e.g. Nginx) for ACLs or restrict access to endpoints like
/admin, please update immediately.See advisory for details: GHSA-9hp6-4448-45g2
What's Changed
Full Changelog: honojs/hono@v4.9.5...v4.9.6
v4.9.5Compare Source
What's Changed
originandallowMethodsby @jobrk in #4373app.fetchinhandleby @yusukebe in #4374New Contributors
Full Changelog: honojs/hono@v4.9.4...v4.9.5
v4.9.4Compare Source
What's Changed
deno publishby @yusukebe in #4364Full Changelog: honojs/hono@v4.9.3...v4.9.4
v4.9.3Compare Source
What's Changed
customFetchoption to allow custom fetch function by @yusukebe in #4360typescriptto5.9.2by @yusukebe in #4362packageManagerfield topackage.jsonby @yusukebe in #4363Full Changelog: honojs/hono@v4.9.2...v4.9.3
v4.9.2Compare Source
What's Changed
removeIndexStringby @yusukebe in #4352New Contributors
Full Changelog: honojs/hono@v4.9.1...v4.9.2
v4.9.1Compare Source
What's Changed
DetailedError.name(+ error tests) by @NamesMT in #4344Full Changelog: honojs/hono@v4.9.0...v4.9.1
v4.9.0Compare Source
Release Notes
Hono v4.9.0 is now available!
This release introduces several enhancements and utilities.
The main highlight is the new
parseResponseutility that makes it easier to work with RPC client responses.parseResponse Utility
The new
parseResponseutility provides a convenient way to parse responses from Hono RPC clients (hc). It automatically handles different response formats and throws structured errors for failed requests.This makes working with RPC client responses much more straightforward and type-safe.
Thanks @NamesMT!
New features
All changes
iss) claim by @yolocat-dev in #4253headerNameto JWK middleware by @JoaquinGimenez1 in #4279jointo correct path resolution by @yusukebe in #4291verifyWithJwksfor external use by @Beyondo in #4302parseResponseutil to smartly parsehc's Response by @NamesMT in #4314skipLibCheckto resolve TypeScript compilation issues by @yusukebe in #4342New Contributors
Full Changelog: honojs/hono@v4.8.12...v4.9.0
v4.8.12Compare Source
What's Changed
/files/:name{.*}by @yusukebe in #4329Full Changelog: honojs/hono@v4.8.11...v4.8.12
v4.8.11Compare Source
What's Changed
outputtype forc.body()by @NamesMT in #4318FetchEventas second argument toapp.fetchby @yusukebe in #4328@hono/eslint-configby @yusukebe in #4330Full Changelog: honojs/hono@v4.8.10...v4.8.11
v4.8.10Compare Source
What's Changed
benchmarks/*by @yusukebe in #4317New Contributors
Full Changelog: honojs/hono@v4.8.9...v4.8.10
v4.8.9Compare Source
What's Changed
isByteStringinc.redirectby @yusukebe in #4307Full Changelog: honojs/hono@v4.8.8...v4.8.9
v4.8.8Compare Source
What's Changed
safeEncodeURIby @yusukebe in #4306Full Changelog: honojs/hono@v4.8.7...v4.8.8
v4.8.7Compare Source
What's Changed
Full Changelog: honojs/hono@v4.8.6...v4.8.7
v4.8.6Compare Source
What's Changed
Full Changelog: honojs/hono@v4.8.5...v4.8.6
v4.8.5Compare Source
What's Changed
Full Changelog: honojs/hono@v4.8.4...v4.8.5
v4.8.4Compare Source
What's Changed
Proxyto support Node.js 24 by @yusukebe in #4260signingSecretoption by @yusukebe in #4263indexstring when calling$url()by @yusukebe in #4267req.json()keeps the content as is by @yusukebe in #4269Full Changelog: honojs/hono@v4.8.3...v4.8.4
v4.8.3Compare Source
What's Changed
tryDecodewhen parsing cookie by @yusukebe in #4240JwtTokenIssuedAterror message by @yusukebe in #4244pkg.pr.newby @NEKOYASAN in #4245New Contributors
Full Changelog: honojs/hono@v4.8.2...v4.8.3
v4.8.2Compare Source
What's Changed
Full Changelog: honojs/hono@v4.8.1...v4.8.2
v4.8.1Compare Source
What's Changed
New Contributors
Full Changelog: honojs/hono@v4.8.0...v4.8.1
v4.8.0Compare Source
Release Notes
Hono v4.8.0 is now available!
This release enhances existing features with new options and introduces powerful helpers for routing and static site generation. Additionally, we're introducing new third-party middleware packages.
fire()FunctionPlus new third-party middleware:
Let's look at each of these.
Reduced the code size
First, this update reduces the code size! The smallest
hono/tinypackage has been reduced by about 800 bytes fromv4.7.11, bringing it down to approximately 11 KB. When gzipped, it's only 4.5 KB. Very tiny!Route Helper
New route helper functions provide easy access to route information and path utilities.
These helpers make route introspection cleaner and more explicit.
Thanks @usualoma!
JWT Custom Header Location
JWT middleware now supports custom header locations beyond the standard
Authorizationheader. You can specify any header name to retrieve JWT tokens from.This is useful when working with APIs that use non-standard authentication headers.
Thanks @kunalbhagawati!
JSX Streaming Nonce Support
JSX streaming now supports nonce values for Content Security Policy (CSP) compliance. The streaming context can include a nonce that gets applied to inline scripts.
Thanks @usualoma!
CORS Dynamic allowedMethods
CORS middleware now supports dynamic
allowedMethodsbased on the request origin. You can provide a function that returns different allowed methods depending on the origin.This enables fine-grained control over CORS policies per origin.
Thanks @Kanahiro!
JWK Allow Anonymous Access
JWK middleware now supports anonymous access with the
allow_anonoption. When enabled, requests without valid tokens can still proceed to your handlers.Additionally,
keysandjwks_urioptions now support functions that receive the context, enabling dynamic key resolution.Thanks @Beyondo!
Cache Status Codes Option
Cache middleware now allows you to specify which status codes should be cached using the
cacheableStatusCodesoption.Thanks @miyamo2!
Service Worker fire() Function
A new
fire()function is available from the Service Worker adapter, providing a cleaner alternative toapp.fire().The
app.fire()method is now deprecated in favor of this approach. Goodbyeapp.fire().SSG Plugin System
Static Site Generation (SSG) now supports a plugin system that allows you to extend the generation process with custom functionality.
For example, the following is easy implementation of a sitemap plugin:
Applying the plugin:
Plugins can hook into various stages of the generation process to perform custom actions.
Thanks @3w36zj6!
Third-party Middleware Updates
In addition to core Hono features, we're excited to introduce new third-party middleware packages that extend Hono's capabilities.
MCP Middleware
A new middleware package
@hono/mcpenables creating remote MCP (Model Context Protocol) servers over Streamable HTTP Transport. This is the initial release with more features planned for the future.Currently, this is ideal for creating stateless and authentication-less remote MCP servers.
Thanks @MathurAditya724!
UA Blocker Middleware
The new
@hono/ua-blockermiddleware allows blocking requests based on user agent headers. It includes blocking AI bots functions.Thanks @finxol!
Zod Validator v4 Support
The
@hono/zod-validatormiddleware now supports Zod v4!All Changes
res.clone()is not supported by @yusukebe in #4198res.clone()is not supported (#4198)" by @yusukebe in #4200cacheableStatusCodesoption by @miyamo2 in #3943allow_anonoption & passingContextto callbacks by @Beyondo in #3961propstoExecutionContextby @yusukebe in #4030NO_COLORon cloudflare workers by @ryuapp in #4094fire()by @yusukebe in #4214app.fire()as deprecated by @yusukebe in #4231New Contributors
Full Changelog: honojs/hono@v4.7.11...v4.8.0
v4.7.11Compare Source
What's Changed
URLSearchParamsto the query-params benchmark by @yusukebe in #4149Configuration
📅 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.