{"id":"CVE-2024-43787","published":"2024-08-22T14:23:44Z","modified":"2024-08-22T15:40:32Z","title":"Hono CSRF middleware can be bypassed using crafted Content-Type header","vendor":"honojs","product":"hono","tier":"tail","description":{"text":"Hono is a Web application framework that provides support for any JavaScript runtime. Hono CSRF middleware can be bypassed using crafted Content-Type header. MIME types are case insensitive, but isRequestedByFormElementRe only matches lower-case. As a result, attacker can bypass csrf middleware using upper-case form-like MIME type. This vulnerability is fixed in 4.5.8.","provenance":"source","from":"CVE.org"},"cvss":{"score":5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00244,"percentile":0.15962,"provenance":"source"},"cwes":[{"id":"CWE-352","name":"Cross-Site Request Forgery"}],"references":[{"url":"https://github.com/honojs/hono/security/advisories/GHSA-rpfr-3m35-5vx5","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/honojs/hono/commit/41ce840379516410dee60c783142e05bb5a22449","tags":["x_refsource_MISC"]},{"url":"https://github.com/honojs/hono/blob/b0af71fbcc6dbe44140ea76f16d68dfdb32a99a0/src/middleware/csrf/index.ts#L16-L17","tags":["x_refsource_MISC"]}],"priority":{"score":6.7,"factors":[{"name":"EPSS percentile","points":3.19},{"name":"CVSS severity","points":3.5}]},"vendorSlug":"honojs","affectedVersions":[{"vendor":"honojs","product":"hono","versions":["< 4.5.8"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-08-22T15:39:07.762887Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"hono","vulnerableRanges":["<4.5.8"],"patched":["4.5.8"],"from":["GHSA-rpfr-3m35-5vx5"],"provenance":"source"}],"summary":{"text":"The flaw is in the CSRF middleware of Hono, a Web application framework for any JavaScript runtime, where the form-detection check matches only lower-case MIME types even though MIME types are case-insensitive. An attacker can exploit this by sending a cross-site request with a crafted, upper-case form-like Content-Type header, which bypasses the CSRF protection, and the attack requires user interaction (such as visiting a malicious page) and a network-reachable target.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:17:03Z"},"euvd":{"id":"EUVD-2024-2653","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-honojs-hono-cve-2024-43787","children":[{"from":"CVE-2024-43787","to":"CVE-2024-48913","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:hono","fromFixed":"4.5.8","toFixed":"4.6.5","daysApart":54},{"kind":"same-code","provenance":"machine","files":["src/middleware/csrf/index.ts"],"commits":["https://github.com/honojs/hono/commit/41ce840379516410dee60c783142e05bb5a22449","https://github.com/honojs/hono/commit/aa50e0ab77b5af8c53c50fe3b271892f8eeeea82"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2023-50710","published":"2023-12-14","fixed":"3.11.7","kev":false},{"cve":"CVE-2024-32869","published":"2024-04-23","fixed":"4.2.7","kev":false,"link":{"from":"CVE-2024-32869","to":"CVE-2024-43787","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:hono","fromFixed":"4.2.7","toFixed":"4.5.8","daysApart":121}]}},{"cve":"CVE-2024-43787","published":"2024-08-22","fixed":"4.5.8","kev":false},{"cve":"CVE-2024-48913","published":"2024-10-15","fixed":"4.6.5","kev":false},{"cve":"CVE-2025-58362","published":"2025-09-04","fixed":"4.9.6","kev":false},{"cve":"CVE-2025-59139","published":"2025-09-12","fixed":"4.9.7","kev":false}],"package":"npm:hono"}}