Vulnerabilidades do Fastify Fastify/express
🔔 Criar alerta RSS Verificador de versão
CVEs publicadas que afetam Fastify Fastify/express: 4 registro(s), com versões afetadas e correções.cpe:2.3:a:fastify:fastify/express
CVE-2026-6556
Crítica · 9.1
CWE-285 30/06/2026
Contorno de Middleware com Escopo de Caminho no @fastify/express (Fastify) por Caminhos de Montagem Não Textuais
As versões 4.0.6 e anteriores do @fastify/express reescrevem o prefixo do plugin para caminhos de montagem de middleware apenas quando o argumento de caminho é uma string. Caminhos de montagem não textuais (arrays de caminhos e expressões regulares) ficam sem prefixo dentro de escopos de plugins com prefixo, de modo que middlewares registrados com essas formas não correspondem ao caminho real da requisição com prefixo. Aplicações que usam middleware com escopo de caminho para autenticação, autorização, limitação de taxa ou auditoria em rotas dentro de um escopo com prefixo podem ser contornadas enviando uma requisição para a rota com prefixo, pois o Fastify ainda corresponde à rota, mas o middleware é ignorado. Correções: atualize para @fastify/express 4.0.7. Contornos: use strings como caminhos de montagem em vez de arrays ou expressões regulares em plugins com prefixo, ou registre uma chamada use por caminho.
CVE-2026-33808
Crítica · 9.1
CWE-436 15/04/2026
@fastify/express vulnerable to middleware authentication bypass via URL normalization gaps (duplicate slashes and semicolons)
Impact@fastify/express v4.0.4 and earlier fails to normalize URLs before passing them to Express middleware when Fastify router normalization options are enabled. This allows complete bypass of path-scoped authentication middleware via duplicate slashes when ignoreDuplicateSlashes is enabled, or via semicolon delimiters when useSemicolonDelimiter is enabled. In both cases, Fastify router normalizes the URL and matches the route, but @fastify/express passes the original un-normalized URL to Express middleware, which fails to match and is skipped. An unauthenticated attacker can access protected routes by manipulating the URL path.
PatchesUpgrade to @fastify/express v4.0.5 or later.
CVE-2026-33807
Crítica · 9.1
CWE-436 15/04/2026
@fastify/express vulnerable to middleware path doubling causing authentication bypass in child plugin scopes
@fastify/express v4.0.4 and earlier contains a path handling bug in the onRegister function that causes middleware paths to be doubled when inherited by child plugins. When a child plugin is registered with a prefix that matches a middleware path, the middleware path is prefixed a second time, causing it to never match incoming requests. This results in complete bypass of Express middleware security controls, including authentication, authorization, and rate limiting, for all routes defined within affected child plugin scopes. No special configuration or request crafting is required.
Upgrade to @fastify/express v4.0.5 or later.
CVE-2026-22037
Alta · 8.4
CWE-177 19/01/2026
@fastify/express vulnerable to Improper Handling of URL Encoding (Hex Encoding)
The @fastify/express plugin adds full Express compatibility to Fastify. A security vulnerability exists in @fastify/express prior to version 4.0.3 where middleware registered with a specific path prefix can be bypassed using URL-encoded characters (e.g., `/%61dmin` instead of `/admin`). While the middleware engine fails to match the encoded path and skips execution, the underlying Fastify router correctly decodes the path and matches the route handler, allowing attackers to access protected endpoints without the middleware constraints. The vulnerability is caused by how @fastify/express matches requests against registered middleware paths. This vulnerability is similar to, but differs from, CVE-2026-22031 because this is a different npm module with its own code. Version 4.0.3 of @fastify/express contains a patch fort the issue.