The vulnerability lies in Next.js's middleware matching logic, which failed to account for all URL variations generated by the App Router, leading to a bypass of authorization checks. The analysis of the security advisory and the associated patch confirms that the getMiddlewareMatchers function in packages/next/src/build/analysis/get-page-static-info.ts was the source of this vulnerability. The commit d166096c399c4fc4e09cd2d1bf26dca6579a855d directly addresses this issue by modifying the regex generation within this function to correctly identify and match App Router's transport-specific URLs, such as those for RSC (React Server Components) and segment prefetching. By adding these variants to the matching logic, the middleware can now correctly intercept and apply security policies to all relevant requests, thus closing the bypass vulnerability. The vulnerable function getMiddlewareMatchers is the key runtime indicator, as it is directly responsible for the flawed logic that was exploited.