{"id":"CVE-2026-112712","state":"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.","publishedAt":"2026-10-20T20:43:48.681Z","updatedAt":"2026-10-30T17:17:28.727Z","severity":{"score":9.1,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","source":"openjs"},"assigner":"openjs","products":["@fastify/middie @fastify/middie"],"affected":[{"vendor":"@fastify/middie","product":"@fastify/middie","packageURL":"pkg:npm/@fastify/middie","defaultStatus":"unaffected","versions":[{"version":"9.0.0","status":"affected","lessThan":"9.3.6","versionType":"semver"},{"version":"9.3.6","status":"unaffected","versionType":"semver"}]}],"references":["https://github.com/fastify/middie/security/advisories/GHSA-5p92-8765-9fv8","https://cna.openjsf.org/security-advisories.html"],"weaknesses":["CWE-436"],"ingestedAt":"2026-10-30T17:24:06.930Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/112xxx/CVE-2026-112712.json","commit":"e8328137ecf4069b095dab9de0403e0e5a96b5ec","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-112712","state":"PUBLISHED","datePublished":"2026-10-20T20:43:48.681Z","dateUpdated":"2026-10-30T17:17:28.727Z","assignerShortName":"openjs","assignerOrgId":"ce714d77-add3-4f53-aff5-83d477b104bb","dateReserved":"2026-10-19T17:43:39.048Z"},"containers":{"cna":{"title":"@fastify/middie vulnerable to path-scoped middleware bypass via scope prefix mismatch","descriptions":[{"lang":"en","value":"@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."}],"affected":[{"vendor":"@fastify/middie","product":"@fastify/middie","packageURL":"pkg:npm/@fastify/middie","defaultStatus":"unaffected","versions":[{"version":"9.0.0","status":"affected","lessThan":"9.3.6","versionType":"semver"},{"version":"9.3.6","status":"unaffected","versionType":"semver"}]}],"references":[{"url":"https://github.com/fastify/middie/security/advisories/GHSA-5p92-8765-9fv8"},{"url":"https://cna.openjsf.org/security-advisories.html"}],"metrics":[{"format":"CVSS","cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","baseScore":9.1,"baseSeverity":"CRITICAL"},"scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-436","lang":"en","description":"CWE-436: Interpretation Conflict","type":"CWE"}]}],"providerMetadata":{"shortName":"openjs","orgId":"ce714d77-add3-4f53-aff5-83d477b104bb","dateUpdated":"2026-10-20T20:43:48.681Z"},"credits":[{"lang":"en","type":"reporter","value":"zachariah-mithani"},{"lang":"en","type":"remediation developer","value":"mcollina"},{"lang":"en","type":"remediation developer","value":"UlisesGascon"}],"x_generator":{"engine":"cve-kit 1.0.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-10-30T15:48:29.631546Z","id":"CVE-2026-112712","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-30T17:17:28.727Z"}}]}}}