CVE-2025-59139 Hono has Body Limit Middleware Bypass
Attackers can bypass body size limits in Hono framework by sending conflicting HTTP headers, potentially causing denial of service through resource exhaustion.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-59139?
CVE-2025-59139 is a medium-severity denial of service vulnerability in honojs hono, published on 12 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Hono is a Web application framework that provides support for any JavaScript runtime. In versions prior to 4.9.7, a flaw in the `bodyLimit` middleware could allow bypassing the configured request body size limit when conflicting HTTP headers were present. 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. 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. 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.
Which versions are affected by CVE-2025-59139?
2 open source packages ship an affected version, including hono. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
hono npm | All versions | 4.9.7 |
hono npm | All versions | 4.9.7 |
Products include Hono Hono.
How do I fix CVE-2025-59139?
Upgrade hono to 4.9.7 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2025-59139 being exploited?
There is no known exploitation of CVE-2025-59139 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in honojs hono
- CVE-2026-27700 Hono is Vulnerable to Authentication Bypass by IP Spoofing in AWS Lambda ALB conninfo
- CVE-2026-22817 JWT Algorithm Confusion via Unsafe Default (HS256) in Hono JWT Middleware Allows Token Forgery and Auth Bypass
- CVE-2026-22818 JWT algorithm confusion in Hono JWK Auth Middleware when JWK lacks "alg" (untrusted header.alg fallback)
- CVE-2025-62610 Hono Improperly Authorizes JWT Audience Validation
- CVE-2026-29045 Hono: Arbitrary file access via serveStatic vulnerability
Sources
Also known as GHSA-92vj-g62v-jqhh, MINI-qr2c-cccf-6gw7.