HONO · GHSA-39q9-qp46-w8xg · Package
FIX → 4.13.18
Hono's bodyLimit() middleware from 4.12.16 stores each transfer chunk of a request body as a separate object before the handler runs. A single unauthenticated request sending the body in very small chunks can use many times its size in memory and crash the process.
first public Nov 11, 2026 · 1 source
Could this affect your app?
Free first check from your website. Connect your repo for the full answer.
Applications built on Hono that use the bodyLimit() middleware to cap request body size, on runtimes such as Bun and Node.js that deliver small transfer chunks individually. Apps that do not use bodyLimit(), or that run on versions outside the affected range, are not exposed.
Not affected if no-bodylimit, version-outside-range
Who cares bun, hono, node, self-hosted
npm ls hono and confirm it is between 4.12.16 and 4.13.17.bodyLimit( to see whether the middleware is used.Upgrade to 4.13.18
hono moves to (fixed version per the advisory data).Since 4.12.16, bodyLimit() reads the whole request body before the handler runs so that the limit also applies to chunked requests. It kept every chunk delivered by the runtime as a separate array and later replayed them. A client that sends the body in very small transfer chunks makes the middleware retain millions of small arrays for a body that is within the configured limit. The memory used is many times the body size, and the process can be terminated before the handler runs.
The size check counted the payload bytes correctly, so the configured maxSize was respected. The problem is the per-chunk overhead: each Uint8Array the runtime delivers was kept as its own object until the body was complete, then enqueued again into a new stream. With one-byte HTTP transfer chunks, a 10 MiB upload becomes about ten million retained objects.
bodyLimit() now copies the incoming chunks into one buffer that grows up to maxSize, and forwards that buffer as the request body. Memory use is bounded by the configured limit regardless of how the body is chunked.
Observed on Bun and Node.js, where the HTTP parser delivers transfer chunks as they arrive.
An unauthenticated client can exhaust the memory of a server that uses bodyLimit() with a single request that stays within the configured limit, terminating the process.
Check it with your coding agent
It reads this page and tells you if your code is affected.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
4.13.18This issue affects applications that use bodyLimit() on runtimes that deliver small transfer chunks individually, such as Bun and Node.js.