{"id":"GHSA-4h7h-rv7c-7m2v","summary":"Hono: `validator('form')` skips validation for `multipart/form-data` requests with extra parameters","details":"### Summary\n\n`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.\n\n### Details\n\nThe 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()`.\n\n`application/x-www-form-urlencoded` is not affected. Only the `multipart/form-data` branch has the strict pattern.\n\nThis 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.\n\n### Impact\n\nAn unauthenticated client can send form fields that the `form` validator never sees, by adding a legal parameter to the `Content-Type` header.\n\nThis may lead to:\n\n- Allow-list or required-field checks in the validator being skipped\n- Fields the application intended to reject reaching the handler\n\nThis issue affects applications that use `validator('form')` with `multipart/form-data` requests and whose validation callback accepts an empty object.\n\n### Workarounds\n\nReject an empty object in the `validator('form')` callback, or validate the result of `await c.req.parseBody()` in the handler.","aliases":["CVE-2026-126356"],"modified":"2026-11-12T23:45:03.255833027Z","published":"2026-11-12T23:30:45Z","database_specific":{"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2026-11-12T23:30:45Z","nvd_published_at":null,"cwe_ids":["CWE-1471","CWE-20"]},"references":[{"type":"WEB","url":"https://github.com/honojs/hono/security/advisories/GHSA-4h7h-rv7c-7m2v"},{"type":"WEB","url":"https://github.com/honojs/hono/commit/d88fab372415277a9e540e895650943dd08eef4a"},{"type":"PACKAGE","url":"https://github.com/honojs/hono"},{"type":"WEB","url":"https://github.com/honojs/hono/releases/tag/v4.13.16"}],"affected":[{"package":{"name":"hono","ecosystem":"npm","purl":"pkg:npm/hono"},"ranges":[{"type":"SEMVER","events":[{"introduced":"4.5.1"},{"fixed":"4.13.16"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-4h7h-rv7c-7m2v/GHSA-4h7h-rv7c-7m2v.json","last_known_affected_version_range":"\u003c= 4.13.15"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"}]}