Hono

Frameworks & Libraries

A small, fast web framework built on Web Standards that runs on any JavaScript runtime.

Latest v4.13.1 · by HonoWebsitehonojs/hono

Release activity

Release activity — 10 releases across 9 days since Jun 23, 2026. Each cell is one day; darker means more releases that day. Nothing is recorded before Jun 23, 2026. Older weeks are hidden at this screen width.
MayJunJulAug
SundayNo releases on Jun 28, 2026No releases on Jul 5, 2026No releases on Jul 12, 2026No releases on Jul 19, 2026No releases on Jul 26, 2026No releases on Aug 2, 2026No releases on Aug 9, 2026
MondayNo releases on Jun 29, 20261 release on Jul 6, 20261 release on Jul 13, 2026No releases on Jul 20, 2026No releases on Jul 27, 20262 releases on Aug 3, 2026No releases on Aug 10, 2026
Tuesday1 release on Jun 23, 2026No releases on Jun 30, 2026No releases on Jul 7, 2026No releases on Jul 14, 2026No releases on Jul 21, 2026No releases on Jul 28, 2026No releases on Aug 4, 2026No releases on Aug 11, 2026
WednesdayNo releases on Jun 24, 2026No releases on Jul 1, 2026No releases on Jul 8, 2026No releases on Jul 15, 2026No releases on Jul 22, 2026No releases on Jul 29, 2026No releases on Aug 5, 2026
ThursdayNo releases on Jun 25, 2026No releases on Jul 2, 2026No releases on Jul 9, 2026No releases on Jul 16, 2026No releases on Jul 23, 2026No releases on Jul 30, 2026No releases on Aug 6, 2026
FridayNo releases on Jun 26, 2026No releases on Jul 3, 20261 release on Jul 10, 2026No releases on Jul 17, 20261 release on Jul 24, 20261 release on Jul 31, 20261 release on Aug 7, 2026
SaturdayNo releases on Jun 27, 2026No releases on Jul 4, 2026No releases on Jul 11, 20261 release on Jul 18, 2026No releases on Jul 25, 2026No releases on Aug 1, 2026No releases on Aug 8, 2026

10 releases since Jun 23, 2026, busiest day 2

Changelog

v4.13.1

Fixed 3
  • Trie router now counts every slash a pattern consumes
  • Stream utilities re-acquire writer lock when pipe() throws
  • ETag skips unsafe methods or error responses on non-* case
What's Changed
New Contributors

Full Changelog: https://github.com/honojs/hono/compare/v4.13.0...v4.13.1

View originalPermalink
How v4.13.1 went

v4.13.0

Added 2
  • First-class support for the HTTP QUERY method with app.query() handler
  • Method Not Allowed middleware that returns 405 responses with Allow header for unsupported methods on registered routes
Changed 9
  • Core request/response path optimizations including skipping unnecessary Headers allocations, replacing regex tests with indexOf, and lazy allocation of internal state, achieving up to 1.25x performance improvement on common routes
  • Cache Middleware now caches QUERY responses using SHA-256 digest of request content as part of the cache key, changing internal cache key format for all methods
  • ETag Middleware now handles conditional requests for QUERY, returning 304 Not Modified when If-None-Match matches
  • CORS Middleware default Access-Control-Allow-Methods now includes QUERY: GET, HEAD, PUT, POST, DELETE, PATCH, QUERY
  • RegExpRouter now detects unsupported path combinations at registration time instead of at first matching request, making registration plus first match roughly 20% faster
  • JWT and JWK middleware now accept realm option for WWW-Authenticate challenge on 401 responses with properly escaped challenge values
Fixed 1
  • JSX function components can now return an array of children without throwing during server-side rendering

Hono v4.13.0 is now available!

The highlight of this release is performance: a batch of low-level optimizations makes the core request/response path significantly faster — up to 1.25x on common routes in our benchmark. This release also adds first-class support for the HTTP QUERY method, defined in RFC 10008, a new Method Not Allowed middleware, and more.

Performance improvements

This release includes a series of small optimizations: skipping unnecessary Headers allocations, replacing regex tests with indexOf, allocating internal state lazily, and more.

Here is benchmarks/fetch comparing v4.12 and v4.13 (ROUNDS=5 ./compare.sh, Bun 1.4.0, Apple Silicon — each measurement runs in a fresh process, and the variant order is reversed every round to avoid warm-up bias):

Benchmarkv4.12v4.13Speedup
pingGET /165.83 ns163.99 ns1.01x
queryGET /id/1?name=bun674.40 ns616.99 ns1.09x
jsonGET /user528.99 ns422.44 ns1.25x
bodyPOST /json1.16 µs1.00 µs1.15x

The individual changes:

In addition, the RegExpRouter rewrite described below makes route registration plus the first match roughly 20% faster.

Thanks @kibertoad for the contributions!

First-class QUERY method support

The QUERY method — a safe, idempotent method that carries a request body — is now a first-class citizen in Hono. You can define QUERY handlers with app.query():

const app = new Hono()

app.query('/search', async (c) => {
  const conditions = await c.req.json()
  return c.json(await search(conditions))
})

Thanks @shellhaki!

QUERY support across built-in middleware

The built-in middleware has been updated to handle QUERY requests properly:

Cache Middleware

The Cache Middleware now caches QUERY responses. Following RFC 10008 Section 2.7, the cache key incorporates a SHA-256 digest of the request content and its representation metadata, so different query bodies are cached separately:

app.query(
  '/search',
  cache({
    cacheName: 'search-cache',
    cacheControl: 'max-age=3600',
  })
)

Note: To support this, the internal cache key format has changed for all methods, including GET. Cached entries are now stored under an internal URL of the form /.hono/cache?__hono_cache_key=.... If you purge cache entries by URL outside of the middleware (e.g. calling caches.delete() with the original request URL), you will need to update that logic. Existing cache entries stored with the old format will simply be re-fetched.

ETag Middleware

The ETag Middleware now handles conditional requests for QUERY, returning 304 Not Modified when If-None-Match matches.

CORS Middleware

The CORS Middleware now includes QUERY in the default Access-Control-Allow-Methods, which is now GET, HEAD, PUT, POST, DELETE, PATCH, QUERY. If you specify allowMethods explicitly, nothing changes for you.

Thanks @usualoma and @Cherry!

Method Not Allowed Middleware

The new Method Not Allowed Middleware returns a 405 Method Not Allowed response with a proper Allow header when the request path matches a registered route but the method does not:

import { methodNotAllowed } from 'hono/method-not-allowed'

const app = new Hono()

app.use(methodNotAllowed({ app }))

app.get('/hello', (c) => c.text('Hello!'))
app.post('/hello', (c) => c.text('Posted!'))

// PUT /hello -> 405 Method Not Allowed
// Allow: GET, HEAD, POST

You can customize the response with the onMethodNotAllowed option:

app.use(
  methodNotAllowed({
    app,
    onMethodNotAllowed: (c, methods) =>
      c.json({ error: 'Method Not Allowed' }, 405, { Allow: methods.join(', ') }),
  })
)

Thanks @usualoma!

RegExpRouter throws UnsupportedPathError at registration time

The RegExpRouter now detects unsupported path combinations when routes are registered, instead of at the first matching request. This means misconfigured routes fail fast at startup rather than at runtime. As a bonus, registration plus the first match is roughly 20% faster.

Thanks @usualoma!

Other improvements
  • hono/utils/headers has been synced with the IANA HTTP Field Name Registry, adding newly registered fields such as Accept-Query. Thanks @akahoshi1421!
  • The JWT and JWK middleware now accept a realm option for the WWW-Authenticate challenge on 401 responses, and challenge values are properly escaped. Thanks @arhxam!
  • JSX: useRef and RefObject are now aligned with React 19. Note that this is a type-level change — RefObject<T> is now { current: T }, so type a nullable ref as RefObject<T | null>, and pass useRef(undefined) instead of useRef(). Thanks @ashunar0!
  • JSX: a function component can now return an array of children without throwing during server-side rendering. Thanks @natsuki-engr!
  • The Compress Middleware now sets Vary: Accept-Encoding on negotiated responses. Thanks @arhxam!
All changes

Full Changelog: https://github.com/honojs/hono/compare/v4.12.34...v4.13.0

Thank you to all contributors!

View originalPermalink
How v4.13.0 went

v4.12.34

Security 4
  • Fix memo() retaining SSR output across requests in hono/jsx, preventing cross-user data disclosure when components read request-scoped values from context
  • Fix ReDoS vulnerability in CORS middleware via Access-Control-Request-Headers header parsing when allowHeaders is not configured
  • Fix algorithmic complexity DoS in Language Middleware caused by quadratic string processing in language-tag normalization
  • Fix Proxy Helper not removing response headers listed in the Connection header, preventing exposure of connection-scoped metadata to clients
Security fixes

This release includes fixes for the following security issues:

memo() retains SSR output across requests, leading to cross-user data disclosure

Affects: hono/jsx (server-side rendering). Fixes memo() reusing a retained render result across requests when props compare equal, where a component reading request-scoped values from ambient context — useContext(), useRequestContext(), or getContext() — could serve HTML rendered for another user's request, disclosing account data or request-scoped secrets such as CSRF tokens. GHSA-f23p-vx2j-j53r

ReDoS in CORS middleware via Access-Control-Request-Headers

Affects: hono/cors. Fixes a whitespace-tolerant regular expression with quadratic backtracking used to parse the Access-Control-Request-Headers preflight header when allowHeaders is 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-2239

Algorithmic 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, or Accept-Language header — could cause excessive CPU consumption and block the event loop. GHSA-54fx-42gc-7vw4

Proxy Helper does not remove response headers listed in the Connection header

Affects: hono/proxy. Fixes proxy() forwarding response headers that the origin's Connection header 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-m7r9


Users who use hono/jsx for server-side rendering, hono/cors, hono/language, or hono/proxy are strongly encouraged to upgrade to this version.

View originalPermalink
How v4.12.34 went

v4.12.33

Fixed 2
  • Relax cookie name validation when parsing Cookie header
  • Handle useSyncExternalStore subscription and snapshot changes in JSX
Removed 1
  • Remove undeci in favor of global fetch
What's Changed

Full Changelog: https://github.com/honojs/hono/compare/v4.12.32...v4.12.33

View originalPermalink
How v4.12.33 went

v4.12.32

Fixed 4
  • Add JWT and Lambda authorizer types for API Gateway v2 in aws-lambda
  • Emit empty id field to reset Last-Event-ID in SSE
  • Use Object.create(null) when parsing query, headers, and params
  • Keep CSP callbacks scoped to their header in secure-headers
What's Changed

Full Changelog: https://github.com/honojs/hono/compare/v4.12.31...v4.12.32

View originalPermalink
How v4.12.32 went

v4.12.31

Fixed 3
  • Reuse cached formData in parseBody()
  • Fix multipart boundary mismatch in cloneRawRequest
  • Emit retry field when retry is 0 in SSE
What's Changed

Full Changelog: https://github.com/honojs/hono/compare/v4.12.30...v4.12.31

View originalPermalink
How v4.12.31 went

v4.12.30

Fixed 4
  • Deduplicate Cache-Control directives case-insensitively
  • Do not compress 206 Partial Content responses
  • Prevent replaceUrlParam from matching a param that prefixes another
  • Set duplex when forwarding a stream body in query mode for method-override
What's Changed

Full Changelog: https://github.com/honojs/hono/compare/v4.12.29...v4.12.30

View originalPermalink
How v4.12.30 went

v4.12.29

Fixed 7
  • Merge function headers with per-request headers in client
  • Resolve the handler with the value passed to the callback in lambda-edge
  • Base64 encode content-encoded response bodies in lambda-edge
  • Treat any non-identity content-encoding as binary in aws-lambda
  • Strip extra properties from array types in JSONParsed
  • Match empty wildcard remainder after regexp param in trie-router
  • Treat If-None-Match: `*` as a match in etag
What's Changed
New Contributors

Full Changelog: https://github.com/honojs/hono/compare/v4.12.28...v4.12.29

View originalPermalink
How v4.12.29 went

v4.12.28

Fixed 5
  • Treat empty string content as found in serve-static
  • Normalize Content-Type media type for case-insensitive matching in utils/body and validator
  • Avoid circular dependency between body.ts and request.ts
  • Report the requested subprotocol on WSContext.protocol in bun
  • Detect V2 events by request context, not rawPath alone in aws-lambda
What's Changed
New Contributors

Full Changelog: https://github.com/honojs/hono/compare/v4.12.27...v4.12.28

View originalPermalink
How v4.12.28 went

v4.12.27

Security 3
  • Fix hono/jsx and hono/jsx-renderer context isolation during SSR to prevent useContext()/useRequestContext() from reading another concurrent request's context value after an await in an async component
  • Fix Server-Side XSS vulnerability in hono/css cx() function by properly escaping untrusted input passed as class names
  • Fix hono/aws-lambda API Gateway v1 and VPC Lattice adapter to correctly match repeated header values by exact match instead of substring matching
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, so useContext()/useRequestContext() read after an await in 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-mjfj

Server-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 JSX class attribute during SSR and inject markup (XSS). GHSA-w62v-xxxg-mg59

API 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.1 dropped when 203.0.113.10 is present) — affecting logic such as X-Forwarded-For-based IP restriction. GHSA-xgm2-5f3f-mvvc


Users of hono/jsx/hono/jsx-renderer, hono/css (cx()), or the hono/aws-lambda API Gateway v1 / VPC Lattice adapters are encouraged to upgrade.

View originalPermalink
How v4.12.27 went
View all

Discussion