You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A flaw in the getPath utility function could allow path confusion and potential bypass of proxy-level ACLs (e.g. Nginx location blocks).
Details
The original implementation relied on fixed character offsets when parsing request URLs. Under certain malformed absolute-form Request-URIs, this could lead to incorrect path extraction.
Most standards-compliant runtimes and reverse proxies reject such malformed requests with a 400 Bad Request, so the impact depends on the application and environment.
Impact
If proxy ACLs are used to protect sensitive endpoints such as /admin, this flaw could have allowed unauthorized access. The confidentiality impact depends on what data is exposed: if sensitive administrative data is exposed, the impact may be High (CVSS 7.5); otherwise it may be Medium (CVSS 5.3).
Resolution
The implementation has been updated to correctly locate the first slash after "://", preventing such path confusion.
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 a Transfer-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 over Content-Length. The issue is fixed in Hono v4.9.7, and all users should upgrade immediately.
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:
import{Hono}from'hono'import{jwt}from'hono/jwt'constapp=newHono()app.use('/api/*',jwt({secret: 'my-secret',verification: {// Require this API to only accept tokens with aud = 'service-a'aud: 'service-a',},}))
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 for iss/nbf/iat/exp only, with no aud support; RFC 7519 requires that when an aud 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
The middleware’s verifyOptions enumerate only iss, nbf, iat, and exp; there is no aud 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.
Standards requirement: RFC 7519 §4.1.3 states that each principal intended to process the JWT MUST identify itself with a value in the aud claim; if it does not, the JWT MUST be rejected (when aud is present). Lack of a first-class aud check increases the risk that tokens issued for Service B are accepted by Service A.
Real-world effect: In deployments with a single IdP/JWKS and shared keys across multiple services, a token minted for one audience can be mistakenly accepted by another audience unless developers implement a custom audience check.
For example, with Google Identity (OIDC), iss is always https://accounts.google.com (shared across apps), but aud differs per application because it is that app’s OAuth client ID; therefore, an attacker can host a separate service that supports “Sign in with Google,” obtain a valid ID token (JWT) for the victim user, and—if your API does not verify aud—use that token to access your API with the victim’s privileges.
Impact
Type: Authentication/authorization weakness via token mix-up (confused-deputy).
Who is impacted: Any Hono user who:
shares an issuer/keys across multiple services (common with a single IdP/JWKS)
distinguishes tokens by intended recipient using aud.
What can happen:
Cross-service access: A token for Service B may be accepted by Service A.
Boundary erosion: ID tokens and access tokens, or separate API audiences, can be inadvertently intermixed.
This may causes unauthorized invocation of sensitive endpoints.
Recommended remediation:
Add verifyOptions.aud (string | string[] | RegExp) to the middleware and enforce RFC 7519 semantics: In verify method, if aud is present and does not match with specified audiences, reject.
Ensure equivalent aud handling exists in the JWK/JWKS flow (jwk middleware / verifyWithJwks) so users of external IdPs can enforce audience consistently.
A flaw in the CORS middleware allowed request Vary headers to be reflected into the response, enabling attacker-controlled Vary values and potentially affecting cache behavior.
Details
The middleware previously copied the Vary header from the request when origin was not set to "*". Since Vary is 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 Vary header. 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 Vary exclusively as a response header.
A flaw in Hono’s JWK/JWKS JWT verification middleware allowed the JWT header’s alg value to influence signature verification when the selected JWK did not explicitly specify an algorithm. This could enable JWT algorithm confusion and, in certain configurations, allow forged tokens to be accepted.
Details
When verifying JWTs using JWKs or a JWKS endpoint, the middleware selected the verification algorithm based on the JWK’s alg field if present, but otherwise fell back to the alg value provided in the unverified JWT header.
Because the alg field in a JWK is optional and often omitted in real-world JWKS configurations, this behavior could allow an attacker to control the algorithm used for verification. In some environments, this may lead to authentication or authorization
bypass through crafted tokens.
The practical impact depends on application configuration, including which algorithms are accepted and how JWTs are used for authorization decisions.
Impact
In affected configurations, an attacker may be able to forge JWTs with attacker-controlled claims, potentially resulting in authentication or authorization bypass.
Applications that do not use the JWK/JWKS middleware, do not rely on JWT-based authentication, or explicitly restrict allowed algorithms are not affected.
Resolution
Update to the latest patched release.
Breaking change:
As part of this fix, the JWT middleware now requires the alg option to be explicitly specified. This prevents algorithm confusion by ensuring that the verification algorithm is not derived from untrusted JWT header values.
Applications upgrading must update their configuration accordingly.
Before (vulnerable configuration)
import{jwt}from'hono/jwt'app.use('/auth/*',jwt({secret: 'it-is-very-secret',// alg was optional}))
A flaw in Hono’s JWK/JWKS JWT verification middleware allowed the algorithm specified in the JWT header to influence signature verification when the selected JWK did not explicitly define an algorithm. This could enable JWT algorithm confusion and, in certain configurations, allow forged tokens to be accepted.
Details
When verifying JWTs using JWKs or a JWKS endpoint, the middleware selected the verification algorithm based on the JWK’s alg field if present. If the JWK did not specify an algorithm, the middleware fell back to using the alg value provided in the unverified JWT header.
Because the alg field in a JWK is optional and commonly omitted in real-world JWKS configurations, this behavior could allow an attacker to influence which algorithm is used for verification. In some environments, this may result in authentication or authorization bypass through crafted JWTs.
The practical impact depends on application configuration, including which algorithms are accepted and how JWTs are used to make authorization decisions.
Impact
In affected configurations, an attacker may be able to forge JWTs with attacker-controlled claims, potentially leading to authentication or authorization bypass.
Applications that do not use the JWK/JWKS middleware, do not rely on JWT-based authentication, or explicitly restrict allowed algorithms are not affected.
Resolution
Update to the latest patched release.
Breaking change:
The JWK/JWKS JWT verification middleware has been updated to require an explicit allowlist of asymmetric algorithms when verifying tokens. The middleware no longer derives the verification algorithm from untrusted JWT header values.
Instead, callers must explicitly specify which asymmetric algorithms are permitted, and only tokens signed with those algorithms will be accepted. This prevents JWT algorithm confusion by ensuring that algorithm selection is fully controlled by application
configuration.
As part of this fix, the alg option is now required when using the JWK/JWKS middleware, and symmetric (HS*) algorithms are no longer accepted in this context.
Before (vulnerable configuration)
import{jwk}from'hono/jwk'app.use('/auth/*',jwk({jwks_uri: 'https://example.com/.well-known/jwks.json',// alg was optional}))
IP Restriction Middleware in Hono is vulnerable to an IP address validation bypass. The IPV4_REGEX pattern and convertIPv4ToBinary function in src/utils/ipaddr.ts do not properly validate that IPv4 octet values are within the valid range of 0-255, allowing attackers to craft malformed IP addresses that bypass IP-based access controls.
Details
The vulnerability exists in two components:
Permissive regex pattern: The IPV4_REGEX (/^[0-9]{0,3}\.[0-9]{0,3}\.[0-9]{0,3}\.[0-9]{0,3}$/) accepts octet values greater than 255 (e.g., 999).
Unsafe binary conversion: The convertIPv4ToBinary function does not validate octet ranges before performing bitwise operations. When an octet exceeds 255, it overflows into adjacent octets during the bit-shift calculation.
For example, the IP address 1.2.2.355 is accepted and converts to the same binary value as 1.2.3.99:
Cache Middleware contains an information disclosure vulnerability caused by improper handling of HTTP cache control directives. The middleware does not respect standard cache control headers such as Cache-Control: private or Cache-Control: no-store, which may result in private or authenticated responses being cached and subsequently exposed to unauthorized users.
Details
The vulnerability exists in the cache decision logic of Cache Middleware. When determining whether a response should be cached, the middleware does not take HTTP cache control semantics into account and may cache responses that are explicitly marked as private by the application. While some runtimes, such as Cloudflare Workers, enforce cache control restrictions at the platform level, other runtimes including Deno, Bun, and Node.js rely on the middleware’s behavior. As a result, applications running on these runtimes may unintentionally cache sensitive responses.
Impact
This issue can lead to Web Cache Deception and information disclosure. If an authenticated user accesses an endpoint that returns user-specific or sensitive data and the response is cached despite being marked as private, subsequent unauthenticated requests may receive the cached response. This may result in the exposure of personally identifiable information or session-related data. The impact is limited to applications that use the hono/cache middleware and rely on it to correctly honor HTTP cache control directives.
Serve static Middleware for the Cloudflare Workers adapter contains an information disclosure vulnerability that may allow attackers to read arbitrary keys from the Workers environment. Improper validation of user-controlled paths can result in unintended access to internal asset keys.
Details
The vulnerability exists in the serve-static middleware used with the Cloudflare Workers adapter. When serving static assets, the middleware does not sufficiently validate or restrict user-supplied paths before resolving them against the Workers asset storage.
As a result, an attacker may craft requests that access arbitrary keys beyond the intended static asset scope. This issue only affects applications running on Cloudflare Workers that use Serve static Middleware with user-controllable request paths.
Impact
This vulnerability may lead to information disclosure by allowing unauthorized access to internal assets or data stored in the Workers environment. The exposed data is limited to readable asset keys and does not allow modification of stored data or execution of arbitrary code.
The impact is limited to applications that use Serve static Middleware in the Cloudflare Workers adapter and rely on it to safely handle untrusted request paths.
A Cross-Site Scripting (XSS) vulnerability exists in the ErrorBoundary component of the hono/jsx library. Under certain usage patterns, untrusted user-controlled strings may be rendered as raw HTML, allowing arbitrary script execution in the victim's browser.
Details
The issue is in the ErrorBoundary component (src/jsx/components.ts). ErrorBoundary previously forced certain rendered output paths to be treated as raw HTML, bypassing the library's default escaping behavior. This could result in unescaped rendering when developers pass user-controlled strings directly as children, or when fallbackRender returns user-controlled strings (for example, reflecting error messages that contain attacker input).
This vulnerability is only exploitable when an application renders untrusted user input within ErrorBoundary without appropriate escaping or sanitization.
Impact
Successful exploitation may allow attackers to execute arbitrary JavaScript in the victim’s browser (reflected XSS). Depending on the application context, this can lead to actions such as session compromise, data exfiltration, or performing unauthorized actions as the victim.
The basicAuth and bearerAuth middlewares previously used a comparison that was not fully timing-safe.
The timingSafeEqual function used normal string equality (===) when comparing hash values. This comparison may stop early if values differ, which can theoretically cause small timing differences.
The implementation has been updated to use a safer comparison method.
Details
The issue was caused by the use of normal string equality (===) when comparing hash values inside the timingSafeEqual function.
In JavaScript, string comparison may stop as soon as a difference is found. This means the comparison time can slightly vary depending on how many characters match.
Under very specific and controlled conditions, this behavior could theoretically allow timing-based analysis.
The implementation has been updated to:
Avoid early termination during comparison
Use a constant-time-style comparison method
Impact
This issue is unlikely to be exploited in normal environments.
It may only be relevant in highly controlled situations where precise timing measurements are possible.
This change is considered a security hardening improvement. Users are encouraged to upgrade to the latest version.
This release includes security fixes for multiple vulnerabilities in Hono and related middleware. We recommend upgrading if you are using any of the affected components.
Components
IP Restriction Middleware
Fixed an IPv4 address validation bypass that could allow IP-based access control to be bypassed under certain configurations.
Cache Middleware
Fixed an issue where responses marked with Cache-Control: private or no-store could be cached, potentially leading to information disclosure on some runtimes.
Fixed an issue that could allow unintended access to internal asset keys when serving static files with user-controlled paths.
hono/jsx ErrorBoundary
Fixed a reflected Cross-Site Scripting (XSS) issue in the ErrorBoundary component that could occur when untrusted strings were rendered without proper escaping.
Recommendation
Users are encouraged to upgrade to this release, especially if they:
Use IP Restriction Middleware
Use Cache Middleware on Deno, Bun, or Node.js
Use Serve Static Middleware with user-controlled paths on Cloudflare Workers
Render untrusted data inside ErrorBoundary components
Security Advisories & CVEs
IP Restriction Middleware – IPv4 address validation bypass
Fixed a JWT algorithm confusion issue in the JWT and JWK/JWKS middleware.
Both middlewares now require an explicit algorithm configuration to prevent the verification algorithm from being influenced by untrusted JWT header values.
If you are using the JWT or JWK/JWKS middleware, please update to the latest version as soon as possible.
This release includes new features for the Hono client, middleware improvements, and an important type system fix.
Type System Fix for Middleware
We've fixed a bug in the type system for middleware. Previously, app did not have the correct type with pathless handlers:
constapp=newHono().use(async(c,next)=>{awaitnext()}).get('/a',async(c,next)=>{awaitnext()}).get((c)=>{returnc.text('Hello')})// app's type was incorrect
You can now pass the base URL as the second type parameter to hc to get more precise URL types:
constclient=hc<typeofapp,'http://localhost:8787'>('http://localhost:8787/')consturl=client.api.posts.$url()// url is TypedURL with precise type information// including protocol, host, and path
This is useful when you want to use the URL as a type-safe key for libraries like SWR.
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
fix(aws-lambda): serve microsoft office files as binary in lambda handler by @matthiasfeist in #4469
fix(request-id): validation accepts = by @ryuapp in #4478
refactor(jwt): reduce the size of the code generated by minification by @usualoma in #4480
The new cloneRawRequest utility allows you to clone the raw Request object after it has been consumed by validators or middleware.
import{cloneRawRequest}from'hono/request'app.post('/api',async(c)=>{constbody=awaitc.req.json()// Clone the consumed requestconstclonedRequest=cloneRawRequest(c.req)awaitexternalLibrary.process(clonedRequest)})
Fixed an issue in the bodyLimit middleware where the body size limit could be bypassed when both Content-Length and Transfer-Encoding headers were present. If you are using this middleware, please update i
renovatebot
changed the title
Update dependency hono to v4.11.7 [SECURITY]
Update dependency hono to v4.11.10 [SECURITY]
Feb 20, 2026
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
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.8.10→4.11.10GitHub Vulnerability Alerts
CVE-2025-58362
Summary
A flaw in the
getPathutility function could allow path confusion and potential bypass of proxy-level ACLs (e.g. Nginx location blocks).Details
The original implementation relied on fixed character offsets when parsing request URLs. Under certain malformed absolute-form Request-URIs, this could lead to incorrect path extraction.
Most standards-compliant runtimes and reverse proxies reject such malformed requests with a 400 Bad Request, so the impact depends on the application and environment.
Impact
If proxy ACLs are used to protect sensitive endpoints such as
/admin, this flaw could have allowed unauthorized access. The confidentiality impact depends on what data is exposed: if sensitive administrative data is exposed, the impact may be High (CVSS 7.5); otherwise it may be Medium (CVSS 5.3).Resolution
The implementation has been updated to correctly locate the first slash after "://", preventing such path confusion.
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.CVE-2026-22817
Summary
A flaw in Hono’s JWK/JWKS JWT verification middleware allowed the JWT header’s
algvalue to influence signature verification when the selected JWK did not explicitly specify an algorithm. This could enable JWT algorithm confusion and, in certain configurations, allow forged tokens to be accepted.Details
When verifying JWTs using JWKs or a JWKS endpoint, the middleware selected the verification algorithm based on the JWK’s
algfield if present, but otherwise fell back to thealgvalue provided in the unverified JWT header.Because the
algfield in a JWK is optional and often omitted in real-world JWKS configurations, this behavior could allow an attacker to control the algorithm used for verification. In some environments, this may lead to authentication or authorizationbypass through crafted tokens.
The practical impact depends on application configuration, including which algorithms are accepted and how JWTs are used for authorization decisions.
Impact
In affected configurations, an attacker may be able to forge JWTs with attacker-controlled claims, potentially resulting in authentication or authorization bypass.
Applications that do not use the JWK/JWKS middleware, do not rely on JWT-based authentication, or explicitly restrict allowed algorithms are not affected.
Resolution
Update to the latest patched release.
Breaking change:
As part of this fix, the JWT middleware now requires the
algoption to be explicitly specified. This prevents algorithm confusion by ensuring that the verification algorithm is not derived from untrusted JWT header values.Applications upgrading must update their configuration accordingly.
Before (vulnerable configuration)
After (patched configuration)
CVE-2026-22818
Summary
A flaw in Hono’s JWK/JWKS JWT verification middleware allowed the algorithm specified in the JWT header to influence signature verification when the selected JWK did not explicitly define an algorithm. This could enable JWT algorithm confusion and, in certain configurations, allow forged tokens to be accepted.
Details
When verifying JWTs using JWKs or a JWKS endpoint, the middleware selected the verification algorithm based on the JWK’s
algfield if present. If the JWK did not specify an algorithm, the middleware fell back to using thealgvalue provided in the unverified JWT header.Because the
algfield in a JWK is optional and commonly omitted in real-world JWKS configurations, this behavior could allow an attacker to influence which algorithm is used for verification. In some environments, this may result in authentication or authorization bypass through crafted JWTs.The practical impact depends on application configuration, including which algorithms are accepted and how JWTs are used to make authorization decisions.
Impact
In affected configurations, an attacker may be able to forge JWTs with attacker-controlled claims, potentially leading to authentication or authorization bypass.
Applications that do not use the JWK/JWKS middleware, do not rely on JWT-based authentication, or explicitly restrict allowed algorithms are not affected.
Resolution
Update to the latest patched release.
Breaking change:
The JWK/JWKS JWT verification middleware has been updated to require an explicit allowlist of asymmetric algorithms when verifying tokens. The middleware no longer derives the verification algorithm from untrusted JWT header values.
Instead, callers must explicitly specify which asymmetric algorithms are permitted, and only tokens signed with those algorithms will be accepted. This prevents JWT algorithm confusion by ensuring that algorithm selection is fully controlled by application
configuration.
As part of this fix, the
algoption is now required when using the JWK/JWKS middleware, and symmetric (HS*) algorithms are no longer accepted in this context.Before (vulnerable configuration)
After (patched configuration)
CVE-2026-24398
Summary
IP Restriction Middleware in Hono is vulnerable to an IP address validation bypass. The
IPV4_REGEXpattern andconvertIPv4ToBinaryfunction insrc/utils/ipaddr.tsdo not properly validate that IPv4 octet values are within the valid range of 0-255, allowing attackers to craft malformed IP addresses that bypass IP-based access controls.Details
The vulnerability exists in two components:
IPV4_REGEX (/^[0-9]{0,3}\.[0-9]{0,3}\.[0-9]{0,3}\.[0-9]{0,3}$/)accepts octet values greater than 255 (e.g.,999).convertIPv4ToBinaryfunction does not validate octet ranges before performing bitwise operations. When an octet exceeds 255, it overflows into adjacent octets during the bit-shift calculation.For example, the IP address
1.2.2.355is accepted and converts to the same binary value as 1.2.3.99:355=256 + 99=0x163(1 << 24) + (2 << 16) + (2 << 8) + 355=0x01020363=1.2.3.99Impact
An attacker can bypass IP-based restrictions by crafting malformed IP addresses:
1.2.3.0/24is blocked, an attacker can use1.2.2.355(or similar) to bypass the restriction.This is exploitable when the application relies on client-provided IP addresses (e.g.,
X-Forwarded-For header) for access control decisions.Affected Components
src/utils/ipaddr.ts:IPV4_REGEX,convertIPv4ToBinary,distinctRemoteAddrCVE-2026-24472
Summary
Cache Middleware contains an information disclosure vulnerability caused by improper handling of HTTP cache control directives. The middleware does not respect standard cache control headers such as
Cache-Control: privateorCache-Control: no-store, which may result in private or authenticated responses being cached and subsequently exposed to unauthorized users.Details
The vulnerability exists in the cache decision logic of Cache Middleware. When determining whether a response should be cached, the middleware does not take HTTP cache control semantics into account and may cache responses that are explicitly marked as private by the application. While some runtimes, such as Cloudflare Workers, enforce cache control restrictions at the platform level, other runtimes including Deno, Bun, and Node.js rely on the middleware’s behavior. As a result, applications running on these runtimes may unintentionally cache sensitive responses.
Impact
This issue can lead to Web Cache Deception and information disclosure. If an authenticated user accesses an endpoint that returns user-specific or sensitive data and the response is cached despite being marked as private, subsequent unauthenticated requests may receive the cached response. This may result in the exposure of personally identifiable information or session-related data. The impact is limited to applications that use the hono/cache middleware and rely on it to correctly honor HTTP cache control directives.
Affected Components
CVE-2026-24473
Summary
Serve static Middleware for the Cloudflare Workers adapter contains an information disclosure vulnerability that may allow attackers to read arbitrary keys from the Workers environment. Improper validation of user-controlled paths can result in unintended access to internal asset keys.
Details
The vulnerability exists in the serve-static middleware used with the Cloudflare Workers adapter. When serving static assets, the middleware does not sufficiently validate or restrict user-supplied paths before resolving them against the Workers asset storage.
As a result, an attacker may craft requests that access arbitrary keys beyond the intended static asset scope. This issue only affects applications running on Cloudflare Workers that use Serve static Middleware with user-controllable request paths.
Impact
This vulnerability may lead to information disclosure by allowing unauthorized access to internal assets or data stored in the Workers environment. The exposed data is limited to readable asset keys and does not allow modification of stored data or execution of arbitrary code.
The impact is limited to applications that use Serve static Middleware in the Cloudflare Workers adapter and rely on it to safely handle untrusted request paths.
Affected Components
CVE-2026-24771
Summary
A Cross-Site Scripting (XSS) vulnerability exists in the
ErrorBoundarycomponent of the hono/jsx library. Under certain usage patterns, untrusted user-controlled strings may be rendered as raw HTML, allowing arbitrary script execution in the victim's browser.Details
The issue is in the
ErrorBoundarycomponent (src/jsx/components.ts).ErrorBoundarypreviously forced certain rendered output paths to be treated as raw HTML, bypassing the library's default escaping behavior. This could result in unescaped rendering when developers pass user-controlled strings directly as children, or when fallbackRender returns user-controlled strings (for example, reflecting error messages that contain attacker input).This vulnerability is only exploitable when an application renders untrusted user input within
ErrorBoundarywithout appropriate escaping or sanitization.Impact
Successful exploitation may allow attackers to execute arbitrary JavaScript in the victim’s browser (reflected XSS). Depending on the application context, this can lead to actions such as session compromise, data exfiltration, or performing unauthorized actions as the victim.
Affected Components
ErrorBoundarycomponentGHSA-gq3j-xvxp-8hrf
Summary
The
basicAuthandbearerAuthmiddlewares previously used a comparison that was not fully timing-safe.The
timingSafeEqualfunction used normal string equality (===) when comparing hash values. This comparison may stop early if values differ, which can theoretically cause small timing differences.The implementation has been updated to use a safer comparison method.
Details
The issue was caused by the use of normal string equality (
===) when comparing hash values inside thetimingSafeEqualfunction.In JavaScript, string comparison may stop as soon as a difference is found. This means the comparison time can slightly vary depending on how many characters match.
Under very specific and controlled conditions, this behavior could theoretically allow timing-based analysis.
The implementation has been updated to:
Impact
This issue is unlikely to be exploited in normal environments.
It may only be relevant in highly controlled situations where precise timing measurements are possible.
This change is considered a security hardening improvement. Users are encouraged to upgrade to the latest version.
Release Notes
honojs/hono (hono)
v4.11.10Compare Source
What's Changed
91def7c)Full Changelog: honojs/hono@v4.11.9...v4.11.10
v4.11.9Compare Source
v4.11.8Compare Source
What's Changed
New Contributors
Full Changelog: honojs/hono@v4.11.7...v4.11.8
v4.11.7Compare Source
Security Release
This release includes security fixes for multiple vulnerabilities in Hono and related middleware. We recommend upgrading if you are using any of the affected components.
Components
IP Restriction Middleware
Fixed an IPv4 address validation bypass that could allow IP-based access control to be bypassed under certain configurations.
Cache Middleware
Fixed an issue where responses marked with
Cache-Control: privateorno-storecould be cached, potentially leading to information disclosure on some runtimes.Serve Static Middleware (Cloudflare Workers adapter)
Fixed an issue that could allow unintended access to internal asset keys when serving static files with user-controlled paths.
hono/jsx
ErrorBoundaryFixed a reflected Cross-Site Scripting (XSS) issue in the
ErrorBoundarycomponent that could occur when untrusted strings were rendered without proper escaping.Recommendation
Users are encouraged to upgrade to this release, especially if they:
ErrorBoundarycomponentsSecurity Advisories & CVEs
IP Restriction Middleware – IPv4 address validation bypass
Cache Middleware ignores
Cache-Control: privateServe Static Middleware (Cloudflare Workers adapter) – Arbitrary key read
hono/jsx
ErrorBoundary– Cross-Site Scripting (XSS)Full Changelog: honojs/hono@v4.11.6...v4.11.7
v4.11.6Compare Source
What's Changed
unique symbolfor more accurate typing. by @usualoma in #4651\rand\r\nline endings in writeSSE by @AprilNEA in #4644New Contributors
Full Changelog: honojs/hono@v4.11.5...v4.11.6
v4.11.5Compare Source
What's Changed
AlgorithmTypesby @yusukebe in #4642New Contributors
Full Changelog: honojs/hono@v4.11.4...v4.11.5
v4.11.4Compare Source
Security
Fixed a JWT algorithm confusion issue in the JWT and JWK/JWKS middleware.
Both middlewares now require an explicit algorithm configuration to prevent the verification algorithm from being influenced by untrusted JWT header values.
If you are using the JWT or JWK/JWKS middleware, please update to the latest version as soon as possible.
JWT middleware
JWK/JWKS middleware
For more details, see the Security Advisory.
What's Changed
@hono/eslint-configand enable curly rule by @yusukebe in #4620algoption for JWT middleware by @yusukebe in #4624New Contributors
Full Changelog: honojs/hono@v4.11.3...v4.11.4
v4.11.3Compare Source
What's Changed
Full Changelog: honojs/hono@v4.11.2...v4.11.3
v4.11.2Compare Source
What's Changed
HonoURLtypes by @yusukebe in #4592SimplifyinToSchemaby @yusukebe in #4597MergeMiddlewareResponsetype by @yusukebe in #4598New Contributors
Full Changelog: honojs/hono@v4.11.1...v4.11.2
v4.11.1Compare Source
What's Changed
Full Changelog: honojs/hono@v4.11.0...v4.11.1
v4.11.0Compare Source
Release Notes
Hono v4.11.0 is now available!
This release includes new features for the Hono client, middleware improvements, and an important type system fix.
Type System Fix for Middleware
We've fixed a bug in the type system for middleware. Previously,
appdid not have the correct type with pathless handlers:This has now been fixed.
Thanks @kosei28!
Typed URL for Hono Client
You can now pass the base URL as the second type parameter to
hcto get more precise URL types:This is useful when you want to use the URL as a type-safe key for libraries like SWR.
Thanks @miyaji255!
Custom NotFoundResponse Type
You can now customize the
NotFoundResponsetype using module augmentation. This allowsc.notFound()to return a typed response:Now the client can correctly infer the 404 response type.
Thanks @miyaji255!
tryGetContext Helper
The new
tryGetContext()helper in the Context Storage middleware returnsundefinedinstead of throwing an error when the context is not available:Thanks @AyushCoder9!
Custom Query Serializer
You can now customize how query parameters are serialized using the
buildSearchParamsoption:Thanks @bolasblack!
New features
All changes
New Contributors
Full Changelog: honojs/hono@v4.10.8...v4.11.0
v4.10.8Compare Source
What's Changed
IsAllowedOriginHandlerby @baseballyama in #4558IsAllowedSecFetchSiteHandlerby @baseballyama in #4559New Contributors
Full Changelog: honojs/hono@v4.10.7...v4.10.8
v4.10.7Compare Source
What's Changed
NotSpecifiedandStrictVerifyOptionsby @ysknsid25 in #4525bun.lockby @yusukebe in #4548New Contributors
Full Changelog: honojs/hono@v4.10.6...v4.10.7
v4.10.6Compare Source
Deperecated
bearer-auth options
The following options are deprecated and will be removed in a future version:
noAuthenticationHeaderMessage=> usenoAuthenticationHeader.messageinvalidAuthenticationHeaderMessage=> useinvalidAuthenticationHeader.messageinvalidTokenMessage=> useinvalidToken.messageWhat's Changed
New Contributors
Full Changelog: honojs/hono@v4.10.5...v4.10.6
v4.10.5Compare Source
What's Changed
Vary: *is present by @pHo9UBenaA in #4504New Contributors
Full Changelog: honojs/hono@v4.10.4...v4.10.5
v4.10.4Compare Source
What's Changed
New Contributors
Full Changelog: honojs/hono@v4.10.3...v4.10.4
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 i