All vulnerabilities

npm

CVE-2026-54288

hono: Body Limit Middleware can be bypassed on AWS Lambda by understating `Content-Length`

Severity
Medium 6.5
Published
16 Jun 2026
Last changed
10 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
4.12.25
Exploit chance
0.1% in the next 30 daysHigher than 4% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Insufficient verification of data authenticity (CWE-345)
Attack
Over the network · No login needed · No user action needed
Attacker can
Read some data · Change some data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Also known as
GHSA-rv63-4mwf-qqc2
Sources
OSV.dev and GitHub

Description

The Body Limit Middleware trusts the request's Content-Length header to decide whether a body is within the limit. On AWS Lambda (API Gateway v1/v2, ALB, VPC Lattice, and Lambda@Edge) the body is delivered fully buffered and the adapter builds the request with the client-declared Content-Length, which need not match the actual payload. A client can declare a tiny Content-Length while sending a much larger body, slipping past the limit.

When Content-Length is present and Transfer-Encoding is absent, the middleware compares the declared value against the limit and passes the request through if it is small enough. On standards-based runtimes the transport enforces that Content-Length matches the body, so this is safe. The Lambda adapters instead reconstruct the request from a buffered payload and copy the client's Content-Length verbatim, so the declared length and the real body size are decoupled.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
hononpm · osv:npm:hono
  • Every version before 4.12.25

About hono

Weekly downloads (npm)
108,805,821npm, 16 Nov 2026

References