Skip to content
Heist/ feed
Back to feed
Medium

Hono has Body Limit Middleware Bypass

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-59139
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 20:20 UTC · Revision 1

Source evidence

Hono has Body Limit Middleware Bypass

core-osv · Original source

Published 12 Sept 2025, 13:03 UTC

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.

osv:CVE-2025-59139
Complete source record
{
  "id": "2b53b3e445f04d4c8bbf0db87b79c941cf49bb24afde170653e56d216eb21485",
  "url": "https://osv.dev/vulnerability/CVE-2025-59139",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Hono has Body Limit Middleware Bypass",
    "summary": "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.",
    "evidence": "osv:CVE-2025-59139",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-59139",
      "aliases": [
        "CVE-2025-59139",
        "GHSA-92vj-g62v-jqhh"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/honojs/hono",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "5ece99500fbcdc1026ab7f458f65cbe9eab29a6b"
                },
                {
                  "fixed": "605c70560b52f13af10379f79b76717042fafe8d"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:hono:hono:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "4.9.7"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "605c70560b52f13af10379f79b76717042fafe8d"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v4.9.6",
            "v4.9.5",
            "v4.9.4",
            "v4.9.3",
            "v4.9.2",
            "v4.9.1",
            "v4.9.0",
            "v4.8.12",
            "v4.8.11",
            "v4.8.10",
            "v4.8.9",
            "v4.8.8",
            "v4.8.7",
            "v4.8.6",
            "v4.8.5",
            "v4.8.4",
            "v4.8.3",
            "v4.8.2",
            "v4.8.1",
            "v4.8.0",
            "v4.7.11",
            "v4.7.10",
            "v4.7.9",
            "v4.7.8",
            "v4.7.7",
            "v4.7.6",
            "v4.7.5",
            "v4.7.4",
            "v4.7.3",
            "v4.7.2",
            "v4.7.1",
            "v4.7.0",
            "v4.6.20",
            "v4.6.19",
            "v4.6.18",
            "v4.6.17",
            "v4.6.16",
            "v4.6.15",
            "v4.6.14",
            "v4.6.13",
            "v4.6.12",
            "v4.6.11",
            "v4.6.10",
            "v4.6.9",
            "v4.6.8",
            "v4.6.7",
            "v4.6.6",
            "v4.6.5",
            "v4.6.4",
            "v4.6.3",
            "v4.6.2",
            "v4.6.1",
            "v4.6.0",
            "v4.5.11",
            "v4.5.10",
            "v4.5.9",
            "v4.5.8",
            "v4.5.7",
            "v4.5.6",
            "v4.5.5",
            "v4.5.4",
            "v4.5.3",
            "v4.5.2",
            "v4.5.1",
            "v4.5.0",
            "v4.4.13",
            "v4.4.12",
            "v4.4.11",
            "v4.4.10",
            "v4.5.0-rc.2",
            "v4.4.9",
            "v4.4.8",
            "v4.4.7",
            "v4.4.6",
            "v4.5.0-rc.1",
            "v4.4.5",
            "v4.4.4",
            "v4.4.3",
            "v4.4.2",
            "v4.4.1",
            "v4.4.0",
            "v4.3.11",
            "v4.3.10",
            "v4.3.9",
            "v4.3.8",
            "v4.3.7",
            "v4.3.6",
            "v4.3.5",
            "v4.3.4",
            "v4.3.3",
            "v4.3.2",
            "v4.3.1",
            "v4.3.0",
            "v4.2.9",
            "v4.2.8",
            "v4.2.7",
            "v4.2.6",
            "v4.2.5",
            "v4.2.4",
            "v4.2.3",
            "v4.2.2",
            "v4.2.1",
            "v4.2.0",
            "v4.1.7",
            "v4.1.6",
            "v4.1.5",
            "v4.1.4",
            "v4.1.3",
            "v4.1.2",
            "v4.1.1",
            "v4.1.0",
            "v4.0.10",
            "v4.1.0-rc.1",
            "v4.0.9",
            "v4.0.8",
            "v4.0.7",
            "v4.0.6",
            "v4.0.5",
            "v4.0.4",
            "v4.0.3",
            "v4.0.2",
            "v4.0.1",
            "v4.0.0",
            "v3.12.12",
            "v3.12.11",
            "v3.12.10",
            "v3.12.9",
            "v4.0.0-rc.3",
            "v3.12.8",
            "v3.12.7",
            "v4.0.0-rc.2",
            "v3.12.6",
            "v4.0.0-rc.1",
            "v3.12.5",
            "v3.12.4",
            "v3.12.3",
            "v3.12.2",
            "v4.0.0-rc.0",
            "v3.12.1",
            "v3.12.0",
            "v3.11.12",
            "v3.11.11",
            "v3.11.10",
            "v3.11.9",
            "v3.11.8",
            "v3.11.7",
            "v3.11.6",
            "v3.11.5",
            "v3.11.4",
            "v3.11.3",
            "v3.11.2",
            "v3.11.1",
            "v3.11.0",
            "v3.10.5",
            "v3.10.4",
            "v3.10.3",
            "v3.10.2",
            "v3.10.1",
            "v3.10.0",
            "v3.9.2",
            "v3.9.1",
            "v3.9.0",
            "v3.9.0-rc.1",
            "v3.8.4",
            "v3.8.3",
            "v3.8.2",
            "v3.8.1",
            "v3.8.0",
            "v3.8.0-rc.3",
            "v3.7.6",
            "v3.8.0-rc.2",
            "v3.7.5",
            "v3.8.0-rc.1",
            "v3.7.4",
            "v3.7.3",
            "v3.7.2",
            "v3.7.1",
            "v3.7.0",
            "v3.6.3",
            "v3.6.2",
            "v3.6.1",
            "v3.6.0",
            "v3.6.0-rc.2",
            "v3.6.0-rc.1",
            "v3.5.8",
            "v3.5.7",
            "v3.5.6",
            "v3.5.5",
            "v3.5.4",
            "v3.5.3",
            "v3.5.2",
            "v3.5.1",
            "v3.5.0",
            "vv3.5.0-rc.1",
            "v3.4.3",
            "v3.4.2",
            "v3.4.1",
            "v3.4.0",
            "v3.3.4",
            "v3.3.3",
            "v3.3.2",
            "v3.3.1",
            "v3.3.0",
            "v3.3.0-rc.1",
            "v3.2.7",
            "v3.2.6",
            "v3.2.5",
            "v3.2.4",
            "v3.2.3",
            "v3.2.2",
            "v3.2.1",
            "v3.2.0",
            "v3.2.0-rc.3",
            "v3.2.0-rc.1",
            "v3.1.8",
            "v3.1.7",
            "v3.1.6",
            "v3.1.5",
            "v3.1.4",
            "v3.1.3",
            "v3.1.2",
            "v3.1.1",
            "v3.1.0",
            "v3.0.5",
            "v3.0.4",
            "v3.0.3",
            "v3.0.2",
            "v3.0.1",
            "v3.0.0",
            "v3.0.0-rc.16",
            "v3.0.0-rc.15",
            "v2.7.8",
            "v3.0.0-rc.14",
            "v3.0.0-rc.13",
            "v2.7.7",
            "v2.7.6",
            "v3.0.0-rc.9",
            "v3.0.0-rc.10",
            "v2.7.5",
            "v2.7.4",
            "v2.7.3",
            "v3.0.0-rc.5",
            "v2.7.2",
            "v3.0.0-rc.4",
            "v2.7.1",
            "v2.7.0",
            "v2.6.2",
            "v2.6.1",
            "v2.6.0",
            "v2.5.10",
            "v2.5.9",
            "v2.5.8",
            "v2.5.7",
            "v2.5.6",
            "v2.5.5",
            "v2.5.4",
            "v2.5.3",
            "v2.5.2",
            "v2.5.1",
            "v2.5.0",
            "v2.4.1",
            "v2.4.0",
            "v2.3.2",
            "v2.3.1",
            "v2.3.0",
            "v2.2.5",
            "v2.2.4",
            "v2.2.3",
            "v2.2.2",
            "v2.2.1",
            "v2.2.0",
            "v2.1.4",
            "v2.1.3",
            "v2.1.2",
            "v2.1.1",
            "v2.1.0",
            "v2.0.9",
            "v2.0.8",
            "v2.0.7",
            "v2.0.6",
            "v2.0.5",
            "v2.0.4",
            "v2.0.3",
            "v2.0.2",
            "v2.0.1",
            "v2.0.0",
            "v1.6.5-0",
            "v1.6.4",
            "v1.6.3",
            "v1.6.2",
            "v1.6.1",
            "v1.6.0",
            "v1.6.0-0",
            "v1.5.2",
            "v1.5.1",
            "v1.5.0",
            "v1.4.7",
            "v1.4.6",
            "v1.4.5",
            "v1.4.4",
            "v1.4.3",
            "v1.4.2",
            "v1.4.1",
            "v1.4.0",
            "v1.3.6",
            "v1.3.5",
            "v1.3.4",
            "v1.3.3",
            "v1.3.2",
            "v1.3.1",
            "v1.3.0",
            "v1.2.2",
            "v1.2.1",
            "v1.2.0",
            "v1.1.1",
            "v1.1.0",
            "v1.0.0",
            "v0.5.10",
            "v0.5.9",
            "v0.5.8",
            "v0.5.7",
            "v0.5.6",
            "v0.5.5",
            "v0.5.4",
            "v0.5.3",
            "v0.5.2",
            "v0.5.1",
            "v0.5.0",
            "v0.4.2",
            "v0.4.1",
            "v0.4.0",
            "v0.3.8",
            "v0.3.7",
            "v0.3.6",
            "v0.3.5",
            "v0.3.4",
            "v0.3.3",
            "v0.3.2",
            "v0.3.1",
            "v0.3.0",
            "v0.2.4",
            "v0.2.3",
            "v0.2.2",
            "v0.2.1",
            "v0.2.0",
            "v0.1.0",
            "v0.0.16",
            "v0.0.15",
            "v0.0.14",
            "v0.0.13",
            "v0.0.11",
            "v0.0.10",
            "v0.0.9",
            "v0.0.8",
            "v0.0.7",
            "v0.0.5",
            "v0.0.4",
            "v0.0.2",
            "v0.0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-59139.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:32.154888414Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59139.json",
        "https://github.com/honojs/hono/security/advisories/GHSA-92vj-g62v-jqhh",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-59139",
        "https://github.com/honojs/hono/commit/605c70560b52f13af10379f79b76717042fafe8d"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-400",
          "CWE-770"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59139.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-59139",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 498924,
  "published_at": "2025-09-12T13:03:05.777+00:00"
}