{"id":"CVE-2026-39407","aliases":["CLSA-2026-1790413170","EUVD-2026-20493","GHSA-gq3j-xvxp-8hrf","GHSA-wmmm-f939-6g9c","ROOT-APP-NPM-CVE-2026-39407"],"status":"published","title":"Hono has a middleware bypass via repeated slashes in serveStatic","description":"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.","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-13","score":0.00467,"percentile":0.40993,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-22"],"published":"2026-04-08T00:16:45Z","modified":"2026-10-28T02:30:50Z","fixes":[{"ecosystem":"npm","package":"hono","fixed_in":["4.12.12"],"sources":["ghsa","osv"]},{"ecosystem":"Root:npm","package":"hono","fixed_in":["4.12.12-aikido.1","4.12.12-aikido.2"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/hono","fixed_in":["4.12.12-root.io.1","4.12.12-root.io.2"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"hono","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.12.12"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"hono","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.12.12-tuxcare.0"},{"fixed":"3.12.12-tuxcare.1"}]}],"versions":["3.12.12"],"bundled":14},{"source":"osv","ecosystem":"npm","package":"hono","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"4.12.12"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"hono","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.12.12-aikido.1"},{"fixed":"4.12.12-aikido.2"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/hono","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.12.12-root.io.1"},{"fixed":"4.12.12-root.io.2"}]}]}],"products":[{"vendor":"hono","product":"hono"},{"vendor":"honojs","product":"hono"}],"references":[{"url":"https://github.com/honojs/hono/security/advisories/GHSA-wmmm-f939-6g9c","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://github.com/honojs/hono/commit/9aff14bd727f8b0435c963363fd803260e7b8e3c","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/honojs/hono/releases/tag/v4.12.12","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-39407","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-wmmm-f939-6g9c"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/39xxx/CVE-2026-39407.json","tags":["advisory"]},{"url":"https://github.com/honojs/hono","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-39407","title":"Hono has a middleware bypass via repeated slashes in serveStatic","description":"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.","status":"published","published":"2026-04-08T14:41:20.301Z","modified":"2026-04-08T16:04:59.862Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:20:03.081354Z"}],"euvd":[{"id":"EUVD-2026-20493","description":"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.","status":"published","published":"2026-04-08T14:41:20Z","modified":"2026-04-08T16:04:59Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T19:25:12.037386Z"}],"ghsa":[{"id":"GHSA-wmmm-f939-6g9c","title":"Hono: Middleware bypass via repeated slashes in serveStatic","description":"## 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 =\u003e matches /admin/*\n/admin//secret.txt =\u003e 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.","status":"published","published":"2026-04-08T00:16:45Z","modified":"2026-04-08T15:34:35Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:39:51.193071Z"}],"nvd":[{"id":"CVE-2026-39407","description":"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.","status":"published","published":"2026-04-08T15:16:14.667Z","modified":"2026-07-24T21:10:00.143Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"secondary"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:12:13.535987Z"}],"osv":[{"id":"CVE-2026-39407","title":"Hono has a middleware bypass via repeated slashes in serveStatic","description":"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.","status":"published","published":"2026-04-08T14:41:20.301Z","modified":"2026-10-28T02:30:50.358014978Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:45:03.040464Z"},{"id":"GHSA-wmmm-f939-6g9c","title":"Hono: Middleware bypass via repeated slashes in serveStatic","description":"## 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 =\u003e matches /admin/*\n/admin//secret.txt =\u003e 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.","status":"published","published":"2026-04-08T00:16:45Z","modified":"2026-09-10T03:50:44.790565774Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:46:58.767335Z"},{"id":"ROOT-APP-NPM-CVE-2026-39407","title":"CVE-2026-39407 in hono - Patched by Root","description":"Root has patched CVE-2026-39407 in the hono package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-07-27T08:20:49Z","modified":"2026-07-27T13:15:11.947660976Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:53:27.649662Z"},{"id":"CLSA-2026-1790413170","title":"TuxCare security update for hono (15 CVEs)","description":"TuxCare rebuilt hono to address 15 CVEs. Fixed in 3.12.12-tuxcare.1.","status":"published","published":"2026-09-26T08:59:30Z","modified":"2026-10-15T09:47:56.5204861Z","updated_at":"2026-11-02T15:43:48.65893Z"}]}}
