The vulnerability is a middleware bypass in NestJS applications using the Fastify adapter. It occurs because GET middleware is not executed for HEAD requests to GET routes. This is due to Fastify's automatic forwarding of HEAD requests to GET handlers, which was not accounted for in the middleware logic. The patch, found in commit cbdf737cd6e7cefa52d05ecea2ae4af95c464614, modifies the createProxyResolver method in packages/core/middleware/middleware-module.ts. This method returns a middleware handler. The patch alters the logic within this handler to explicitly check if a HEAD request is made to a GET route and, if so, executes the corresponding GET middleware. Therefore, MiddlewareModule.createProxyResolver is the key function to identify, as it creates the vulnerable middleware handler.