mirror of
https://github.com/nestjs/nest.git
synced 2026-10-28 09:45:43 +08:00
A default-scoped gateway with no scoped global enhancers builds its message handlers once, in the static context and without an inquirer id, and the injector constructed the transient enhancers of a static provider for entry providers only. A transient guard bound to such a gateway with @UseGuards() was then looked up as the placeholder whose constructor never ran. With an arrow-function canActivate it was skipped, so the handler ran for any client; with a prototype method it ran without its dependencies. The bootstrap load of every static provider now constructs its transient enhancers with the provider as the inquirer, and the static handlers of a gateway are created with its id as the inquirer, as those of controllers and entry providers are. Such guards now run. Discovered by Anthropic's OSS Scanner, as vulnerability ANT-2026-J6VYP0AI.