CVE-2025-59139: Hono Hono Has Body Limit Middleware Vulnerability

MODERATE
Advisory Identifier: GHSA-92vj-g62v-jqhh
CVSS 5.3
CWE-400 CWE-770
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2025-59139
GHSA Identifier GHSA-92vj-g62v-jqhh
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Hono
Package Ecosystem npm
Published Date
Last Updated

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (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.

hono fixed: 4.9.7
npm install hono@4.9.7
Verify Direct and Transitive Dependencies

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

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

CVE-2025-59139 Affected Hono Versions

1 component(s)
Fixed Versions:
4.9.7
Product / Package Ecosystem Affected Versions Fixed Version
hono
npm
< 4.9.7
4.9.7

References

Frequently Asked Questions

What is CVE-2025-59139?
CVE-2025-59139 is a security vulnerability in Hono involving Hono has Body Limit Middleware Bypass under CWE-400: Uncontrolled Resource Consumption.
Which Hono versions are affected?
Affected versions include releases prior to 4.9.7 across affected packages: hono.
What version fixes CVE-2025-59139?
Upgrading to 4.9.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is hono affected?
Yes, hono is affected in releases prior to 4.9.7. Upgrade your dependency to 4.9.7 or later.
What is the CVSS score of CVE-2025-59139?
CVE-2025-59139 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2025-59139?
CVE-2025-59139 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2025-59139?
Run the dependency tree command: 'npm ls hono'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}