CVE-2025-59139: Hono Hono Has Body Limit Middleware Vulnerability
MODERATECVE-2025-59139 is a MODERATE (CVSS 5.3) hono has body limit middleware vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Hono libraries in the npm ecosystem. The issue involves hono has body limit middleware bypass. Remediation is available by upgrading affected packages to version 4.9.7.
CVE-2025-59139 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2025-59139
To remediate this vulnerability, upgrade all affected Hono dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install hono@4.9.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls hono
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-59139, inspect your project dependencies using npm:
npm ls hono
Analyze the terminal output to locate any version of Hono in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.9.7), your application is affected.
Note: The npm ls hono command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Hono, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-59139 Affected Hono Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
hono
|
npm |
< 4.9.7
|
4.9.7
|
References
Frequently Asked Questions
What is CVE-2025-59139?
Which Hono versions are affected?
What version fixes CVE-2025-59139?
Is hono affected?
What is the CVSS score of CVE-2025-59139?
What CWE is associated with CVE-2025-59139?
How can I check npm dependencies for CVE-2025-59139?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-92vj-g62v-jqhh",
"modified" : "2025-09-12T21:12:20Z",
"published" : "2025-09-12T21:12:20Z",
"aliases" : [ "CVE-2025-59139" ],
"summary" : "Hono has Body Limit Middleware Bypass",
"details" : "### Summary\nA flaw in the `bodyLimit` middleware could allow bypassing the configured request body size limit when conflicting HTTP headers were present.\n\n### Details\nThe 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.\n\nMost 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.\n\n### Impact\nIf 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.\n\n### Resolution\nThe 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "hono"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.9.7"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/honojs/hono/security/advisories/GHSA-92vj-g62v-jqhh"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59139"
}, {
"type" : "WEB",
"url" : "https://github.com/honojs/hono/commit/605c70560b52f13af10379f79b76717042fafe8d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/honojs/hono"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-12T21:12:20Z",
"nvd_published_at" : "2025-09-12T14:15:41Z"
}
}