CVE-2025-59139 Hono has Body Limit Middleware Bypass

Medium 5.3 Published Updated

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.

Weakness: CWE-770, CWE-400

Which versions are affected by CVE-2025-59139?

2 open source packages ship an affected version, including hono. It affects 1 product.

PackageAffectedFixed in
hono npmAll versions4.9.7
hono npmAll versions4.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.

Sources

Also known as GHSA-92vj-g62v-jqhh, MINI-qr2c-cccf-6gw7.

Is CVE-2025-59139 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free