{"id":"CVE-2026-39407","aliases":["CVE-2026-39407","GHSA-wmmm-f939-6g9c"],"related":[],"kind":"vulnerability","state":"published","title":"Hono has a middleware bypass via repeated slashes in serveStatic","summary":"Hono is a Web application framework that provides support for any JavaScript runtime. Prior to 4.12.12, a path handling inconsistency in serveStatic allows protected static files to be accessed by using repeated slashes (//) in the request path. When route-based middleware (e.g., /admin/*) is used for authorization, the router may not match paths containing repeated slashes, while serveStatic resolves them as normalized paths. This can lead to a middleware bypass. This vulnerability is fixed in 4.12.12.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Hono is a Web application framework that provides support for any JavaScript runtime. Prior to 4.12.12, a path handling inconsistency in serveStatic allows protected static files to be accessed by using repeated slashes (//) in the request path. When route-based middleware (e.g., /admin/*) is used for authorization, the router may not match paths containing repeated slashes, while serveStatic resolves them as normalized paths. This can lead to a middleware bypass. This vulnerability is fixed in 4.12.12.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nA path handling inconsistency in `serveStatic` allows protected static files to be accessed by using repeated slashes (`//`) in the request path.\n\nWhen route-based middleware (e.g., `/admin/*`) is used for authorization, the router may not match paths containing repeated slashes, while serveStatic resolves them as normalized paths. This can lead to a middleware bypass.\n\n## Details\n\nThe routing layer and `serveStatic` handle repeated slashes differently.\n\nFor example:\n\n```\n/admin/secret.txt => matches /admin/*\n/admin//secret.txt => may not match /admin/*\n```\n\nHowever, `serveStatic` may interpret both paths as the same file location (e.g., `admin/secret.txt`) and return the file.\n\nThis inconsistency allows a request such as:\n\n```\nGET //admin/secret.txt\n```\n\nto bypass middleware registered on `/admin/*` and access protected files.\n\nThe issue has been fixed by rejecting paths that contain repeated slashes, ensuring consistent behavior between route matching and static file resolution.\n\n## Impact\n\nAn attacker can access static files that are intended to be protected by route-based middleware by using repeated slashes in the request path.\n\nThis can lead to unauthorized access to sensitive files under the static root.\n\nThis issue affects applications that rely on serveStatic together with route-based middleware for access control.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Hono es un framework de aplicación web que proporciona soporte para cualquier tiempo de ejecución de JavaScript. Antes de la versión 4.12.12, una inconsistencia en el manejo de rutas en serveStatic permite que archivos estáticos protegidos sean accedidos usando barras repetidas (//) en la ruta de la solicitud. Cuando se utiliza middleware basado en rutas (p. ej., /admin/*) para la autorización, el router puede no coincidir con rutas que contienen barras repetidas, mientras que serveStatic las resuelve como rutas normalizadas. Esto puede llevar a una omisión del middleware. Esta vulnerabilidad se corrige en la versión 4.12.12.","source":"nvd"}],"published":"2026-04-08T00:16:45.000Z","modified":"2026-09-10T03:50:44.790Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 4.12.12","status":"affected"}],"vendor":"honojs","product":"hono","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.12.12"}],"ecosystem":"npm","package":"hono","purl":"pkg:npm/hono","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"4.12.11"}],"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-wmmm-f939-6g9c","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/honojs/hono/commit/9aff14bd727f8b0435c963363fd803260e7b8e3c","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/honojs/hono/releases/tag/v4.12.12","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-39407","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/honojs/hono","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-04-08T16:04:53.788Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-39407","url":"https://www.cve.org/CVERecord?id=CVE-2026-39407","licence":"CVE Terms of Use","modified":"2026-04-08T16:04:59.862Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-wmmm-f939-6g9c","url":"https://github.com/advisories/GHSA-wmmm-f939-6g9c","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:44.790Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-39407","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-39407","licence":"Public domain","modified":"2026-07-24T21:10:00.143Z"}],"updatedAt":"2026-11-25T22:59:18.282Z","epss":{"score":0.00478,"percentile":0.42871,"date":"2026-12-01T12:00:22.000Z"}}