{"id":"CVE-2026-112712","aliases":["CLSA-2026-1793790391","EUVD-2026-105361","GHSA-5p92-8765-9fv8"],"status":"published","title":"@fastify/middie vulnerable to path-scoped middleware bypass via scope prefix mismatch","description":"@fastify/middie is the Express-style middleware engine for Fastify. In versions from 9.0.0 through 9.3.5, the use() function joined a path-scoped middleware's mount path to the plugin scope prefix in a way that could diverge from the path Fastify's router serves, most often when the scope prefix ended in a slash, and also for array mount paths and for mount paths written without a leading slash. When the two paths disagreed, the middleware was silently skipped while the route handler still ran, so path-scoped middleware such as authentication, authorization, or rate limiting could be bypassed by a single unauthenticated request. The issue is fixed in @fastify/middie 9.3.6, and users should upgrade to 9.3.6 or later. As a workaround, enforce authorization in a Fastify hook such as preHandler that runs after the router has resolved the request.","severity":{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00314,"percentile":0.24613,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-436"],"published":"2026-10-20T20:43:48Z","modified":"2026-11-04T14:45:04Z","fixes":[{"ecosystem":"TuxCare:npm","package":"@fastify/middie","fixed_in":["8.3.3-tuxcare.4"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"TuxCare:npm","package":"@fastify/middie","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"8.3.3-tuxcare.0"},{"fixed":"8.3.3-tuxcare.4"}]}],"versions":["8.3.3","8.3.3-tuxcare.1","8.3.3-tuxcare.2","8.3.3-tuxcare.3"]}],"products":[{"vendor":"@fastify/middie","product":"@fastify/middie"}],"references":[{"url":"https://github.com/fastify/middie/security/advisories/GHSA-5p92-8765-9fv8","tags":["advisory"]},{"url":"https://cna.openjsf.org/security-advisories.html","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/112xxx/CVE-2026-112712.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-112712","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2026-112712","title":"@fastify/middie vulnerable to path-scoped middleware bypass via scope prefix mismatch","description":"@fastify/middie is the Express-style middleware engine for Fastify. In versions from 9.0.0 through 9.3.5, the use() function joined a path-scoped middleware's mount path to the plugin scope prefix in a way that could diverge from the path Fastify's router serves, most often when the scope prefix ended in a slash, and also for array mount paths and for mount paths written without a leading slash. When the two paths disagreed, the middleware was silently skipped while the route handler still ran, so path-scoped middleware such as authentication, authorization, or rate limiting could be bypassed by a single unauthenticated request. The issue is fixed in @fastify/middie 9.3.6, and users should upgrade to 9.3.6 or later. As a workaround, enforce authorization in a Fastify hook such as preHandler that runs after the router has resolved the request.","status":"published","published":"2026-10-20T20:43:48.681Z","modified":"2026-10-30T17:17:28.727Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical","assessor":"cna"}],"cwes":["CWE-436"],"updated_at":"2026-11-02T13:44:40.64332Z"}],"euvd":[{"id":"EUVD-2026-105361","description":"@fastify/middie is the Express-style middleware engine for Fastify. In versions from 9.0.0 through 9.3.5, the use() function joined a path-scoped middleware's mount path to the plugin scope prefix in a way that could diverge from the path Fastify's router serves, most often when the scope prefix ended in a slash, and also for array mount paths and for mount paths written without a leading slash. When the two paths disagreed, the middleware was silently skipped while the route handler still ran, so path-scoped middleware such as authentication, authorization, or rate limiting could be bypassed by a single unauthenticated request. The issue is fixed in @fastify/middie 9.3.6, and users should upgrade to 9.3.6 or later. As a workaround, enforce authorization in a Fastify hook such as preHandler that runs after the router has resolved the request.","status":"published","published":"2026-10-20T20:43:48Z","modified":"2026-10-30T17:17:28Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical"}],"updated_at":"2026-11-02T16:59:05.567782Z"}],"nvd":[{"id":"CVE-2026-112712","description":"@fastify/middie is the Express-style middleware engine for Fastify. In versions from 9.0.0 through 9.3.5, the use() function joined a path-scoped middleware's mount path to the plugin scope prefix in a way that could diverge from the path Fastify's router serves, most often when the scope prefix ended in a slash, and also for array mount paths and for mount paths written without a leading slash. When the two paths disagreed, the middleware was silently skipped while the route handler still ran, so path-scoped middleware such as authentication, authorization, or rate limiting could be bypassed by a single unauthenticated request. The issue is fixed in @fastify/middie 9.3.6, and users should upgrade to 9.3.6 or later. As a workaround, enforce authorization in a Fastify hook such as preHandler that runs after the router has resolved the request.","status":"published","published":"2026-10-20T21:17:17.91Z","modified":"2026-10-30T18:17:21.243Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical","assessor":"secondary"}],"cwes":["CWE-436"],"updated_at":"2026-11-02T14:13:01.161484Z"}],"osv":[{"id":"CVE-2026-112712","title":"@fastify/middie vulnerable to path-scoped middleware bypass via scope prefix mismatch","description":"@fastify/middie is the Express-style middleware engine for Fastify. In versions from 9.0.0 through 9.3.5, the use() function joined a path-scoped middleware's mount path to the plugin scope prefix in a way that could diverge from the path Fastify's router serves, most often when the scope prefix ended in a slash, and also for array mount paths and for mount paths written without a leading slash. When the two paths disagreed, the middleware was silently skipped while the route handler still ran, so path-scoped middleware such as authentication, authorization, or rate limiting could be bypassed by a single unauthenticated request. The issue is fixed in @fastify/middie 9.3.6, and users should upgrade to 9.3.6 or later. As a workaround, enforce authorization in a Fastify hook such as preHandler that runs after the router has resolved the request.","status":"published","published":"2026-10-20T20:43:48.681Z","modified":"2026-11-01T02:30:44.310909322Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","level":"critical"}],"cwes":["CWE-436"],"updated_at":"2026-11-02T15:44:55.938017Z"},{"id":"CLSA-2026-1793790391","title":"TuxCare security update for @fastify/middie (1 CVE)","description":"TuxCare rebuilt @fastify/middie to address 1 CVE. Fixed in 8.3.3-tuxcare.4.","status":"published","published":"2026-11-04T12:06:31Z","modified":"2026-11-04T14:45:04.312196963Z","updated_at":"2026-11-04T15:03:54.132276Z"}]}}
