---
id: "GHSA-4h7h-rv7c-7m2v"
page: "https://infrastack.ai/live/GHSA-4h7h-rv7c-7m2v"
kind: "vulnerability"
aliases: ["GHSA-4h7h-rv7c-7m2v"]
title: "`validator('form')` skips validation for `multipart/form-data` requests with extra parameters"
severity: "medium"
cvss: 5.3
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "hono", "fixed": ["4.13.16"], "affected": ">= 4.5.1, <= 4.13.15", "ecosystem": "npm"}]
ecosystems: ["npm"]
tags: ["bun", "cloudflare-workers", "cwe-20", "deno", "hono", "node", "package"]
not_affected_if: ["no-validator-form", "rejects-empty-object", "urlencoded-only"]
published_at: "2026-11-01T02:36:54+00:00"
first_seen_at: "2026-11-09T22:53:17+00:00"
updated_at: "2026-11-09T22:56:32+00:00"
sources: [{"source": "ghsa-repo", "url": "https://github.com/honojs/hono/security/advisories/GHSA-4h7h-rv7c-7m2v", "first_seen_at": "2026-11-09T22:53:17+00:00"}]
exploit_sources: []
---

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

Link for people: https://infrastack.ai/live/GHSA-4h7h-rv7c-7m2v (this .md is for agents)

Hono's validator('form') middleware only recognizes a multipart/form-data Content-Type with a single boundary parameter, so a request adding a charset parameter or extra whitespace is treated as having no form data. The validation callback then receives an empty object while the handler can still read all submitted fields.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- npm:hono affected >= 4.5.1, <= 4.13.15 fixed 4.13.16

## How to check

- Run `npm ls hono` in the project and look for a version between `4.5.1` and `4.13.15`
- Search the code for `validator('form'` to find routes that rely on the form validator
- Check whether the validation callback would accept an empty object

## Fix

- Hono: move to `4.13.16`
- Workaround from the advisory: reject an empty object in the validator callback, or validate the result of `await c.req.parseBody()` in the handler

## Timeline

- 2026-11-09T22:53:17+00:00 ghsa-repo https://github.com/honojs/hono/security/advisories/GHSA-4h7h-rv7c-7m2v

## Documents

- [advisory] Maintainer's advisory: github.com https://github.com/honojs/hono/security/advisories/GHSA-4h7h-rv7c-7m2v

## From the sources

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

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
