{"id":"CVE-2026-112712","kind":"vulnerability","aliases":["CVE-2026-112712"],"related":[],"title":"Fastify middie: path-scoped middleware silently skipped, bypassing auth checks","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.","summary":"In @fastify/middie versions 9.0.0 through 9.3.5, path-scoped middleware can be silently skipped while the route handler still runs. An unauthenticated request can therefore bypass authentication, authorization, or rate limiting that was attached as middleware.","severity":"critical","cvss":9.1,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["api-servers","fastify","node","package"],"not_affected_if":["default-config"],"how_to_check":"Check the installed version: npm ls @fastify/middie","fix":"Upgrade @fastify/middie to 9.3.6 or later.\nAs a workaround, move authorization checks into a Fastify preHandler hook.","status":"open","published_at":"2026-10-20T21:17:17+00:00","first_seen_at":"2026-10-23T21:57:21+00:00","triaged_at":"2026-10-23T22:39:14+00:00","updated_at":"2026-10-23T22:39:14+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-23T22:39:14Z","model":"claude-haiku-5-5","output":{"fix":"Upgrade @fastify/middie to 9.3.6 or later.\nAs a workaround, move authorization checks into a Fastify preHandler hook.","reach":"internet","title":"Fastify middie: path-scoped middleware silently skipped, bypassing auth checks","impact":"high","summary":"In @fastify/middie versions 9.0.0 through 9.3.5, path-scoped middleware can be silently skipped while the route handler still runs. An unauthenticated request can therefore bypass authentication, authorization, or rate limiting that was attached as middleware.","category":"package","who_cares":["fastify","node","api-servers"],"confidence":0.8,"needs_auth":"no","worst_case":"Unauthenticated requests reach protected route handlers, bypassing auth checks","analyst_note":"","how_to_check":"Check the installed version: npm ls @fastify/middie\nunknown","needs_analyst":false,"not_affected_if":["default-config"],"user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.000494,"input_tokens":3088,"output_tokens":370,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-112712':14A,17A '-2026':13A,16A '9.0.0':27B,73C '9.3.5':29B,75C '9.3.6':173C,179C 'also':117C 'api':19B 'api-serv':18B 'array':119C 'attach':57B 'auth':10A 'authent':50B,154C 'author':51B,155C,186C 'bypass':9A,49B,161C 'check':11A 'could':97C,159C 'cve':12A,15A 'disagre':135C 'diverg':98C 'end':112C 'enforc':185C 'engin':67C 'express':64C 'express-styl':63C 'fastifi':1A,21B,69C,102C,189C 'fastify/middie':25B,60C,172C 'fix':170C 'function':78C 'handler':41B,144C 'hook':190C 'issu':168C 'join':79C 'later':181C 'lead':129C 'limit':54B,158C 'middi':2A 'middlewar':6A,33B,59B,66C,84C,137C,151C 'mount':86C,120C,124C 'node':22B 'often':107C 'packag':23B 'path':4A,31B,82C,87C,101C,121C,125C,134C,149C 'path-scop':3A,30B,81C,148C 'plugin':90C 'prefix':92C,111C 'prehandl':193C 'ran':146C 'rate':53B,157C 'request':46B,166C,202C 'resolv':200C 'rout':40B,143C 'router':104C,198C 'run':43B,195C 'scope':5A,32B,83C,91C,110C,150C 'serv':105C 'server':20B 'silent':7A,36B,139C 'singl':164C 'skip':8A,37B,140C 'slash':115C,130C 'still':42B,145C 'style':65C 'therefor':48B 'two':133C 'unauthent':45B,165C 'upgrad':177C 'use':77C 'user':175C 'version':26B,71C 'way':95C 'without':127C 'workaround':184C 'written':126C","nicknames":[],"mitigations":[],"who_affected":null,"tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-20T21:17:17+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","cvss_by":"ce714d77-add3-4f53-aff5-83d477b104bb","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-112712","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-112712","severity":null,"published_at":"2026-10-20T21:17:17+00:00","modified_at":"2026-10-22T15:25:17+00:00","first_seen_at":"2026-10-23T21:57:21+00:00","fetched_at":"2026-10-23T22:28:58+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}