Medium

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

  • Disclosed: 12.11.2026
  • Updated: 13.11.2026 01:17

Summary

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.

Details

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.

This issue arises when an application relies on validator('form') to reject or restrict fields and the validation callback does not fail on an empty object.

Impact

An unauthenticated client can send form fields that the form validator never sees, by adding a legal parameter to the Content-Type header.

This may lead to:

  • Allow-list or required-field checks in the validator being skipped
  • Fields the application intended to reject reaching the handler

This issue affects applications that use validator('form') with multipart/form-data requests and whose validation callback accepts an empty object.

Workarounds

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

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package hono >= 4.5.1, < 4.13.16 4.13.16

References

CVSS score 5.3/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness (CWE)
CWE-1471, CWE-20
Platform
npm
Package
hono
Disclosed
12.11.2026
Updated
13.11.2026 01:17

Sources and licenses

OSV / GitHub Advisory Database - GHSA-4h7h-rv7c-7m2v - CC BY 4.0

Vulnerability history: hono

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (57) in the archive
Total entries
57
First → latest
12.2023 11.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 7
  • Medium 45
  • Low 5

Disclosures per year

  1. 2023: 1
  2. 2024: 3
  3. 2025: 4
  4. 2026: 49
Severity:
  1. Hono: `validator('form')` skips validation for `multipart/form-data` requests with extra parameters this entry
    Medium · 5.3 CVE-2026-126356 >= 4.5.1, < 4.13.16 4.13.16
  2. High · 8.1 CVE-2025-62610 >= 1.1.0, < 4.10.2 4.10.2
  3. High · 7.5 CVE-2025-58362 >= 4.8.0, < 4.9.6 4.9.6

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.