All vulnerabilities

npm

CVE-2026-126356

Hono: `validator('form')` skips validation for `multipart/form-data` requests with extra parameters

Severity
Medium 5.3
Published
12 Nov 2026
Last changed
12 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
4.13.16
Exploit chance
0.4% in the next 30 daysHigher than 33% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
CWE-1471Improper input validation (CWE-20)
Attack
Over the network · No login needed · No user action needed
Attacker can
Change some data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Also known as
GHSA-4h7h-rv7c-7m2v
Sources
OSV.dev and GitHub

Description

validator('form') only recognizes a multipart/form-data Content-Type that carries nothing but a single boundary parameter. A request with another legal parameter, such as charset, or with extra whitespace after the ; is not recognized as a form. The validation callback then receives an empty object, while c.req.parseBody() still parses the body as a form.

The check that decides whether a request body is a form was written as a strict pattern over the whole Content-Type value. Any parameter list that does not look exactly like ; boundary=... fails the check. When it fails, the middleware does not read the body and passes an empty object to the validation callback. If the callback accepts an empty object, the request proceeds to the handler, which can still read all submitted fields through c.req.parseBody() or c.req.formData().

application/x-www-form-urlencoded is not affected. Only the multipart/form-data branch has the strict pattern.

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

Workarounds

Reject an empty object in the validator('form') callback, or validate the result of await c.req.parseBody() in the handler.

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
hononpm · osv:npm:hono
  • From 4.5.1 before 4.13.16

About hono

Weekly downloads (npm)
113,589,642npm, 23 Nov 2026

References