CVE-2025-59139: Hono has Body Limit Middleware Bypass

Published Sep 12, 2025
·
Updated

Summary 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.

Other sources

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.

MITRE

Affected Software

3 affected componentsFixes available
Hono Body Limit Middleware<4.9.7
npm/hono<4.9.7
4.9.7
Hono Hono Node.js<4.9.7

Event History

Sep 12, 2025
CVE Published
via MITRE·01:03 PM
Data Sourced
via MITRE·01:03 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·09:12 PM
Data Sourced
via GitHub·09:12 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-59139?

The CVE-2025-59139 vulnerability is classified as a moderate severity issue due to its potential for bypassing request body size limits.

2

How do I fix CVE-2025-59139?

To fix CVE-2025-59139, upgrade the Hono Body Limit Middleware to version 4.9.7 or later, which addresses this flaw.

3

What causes the vulnerability in CVE-2025-59139?

CVE-2025-59139 is caused by a flaw in the `bodyLimit` middleware that allows bypassing the request body size limit when conflicting HTTP headers are present.

4

Which versions of Hono are affected by CVE-2025-59139?

Versions of the Hono Body Limit Middleware prior to 4.9.7 are affected by CVE-2025-59139.

5

What is the impact of CVE-2025-59139 on applications?

The impact of CVE-2025-59139 is that it may allow attackers to send larger request bodies than intended, potentially leading to denial of service or other unintended behaviors.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203