Wiz se junta ao Google Cloud: Fazendo magia juntos

CVE-2026-132131: 
JavaScript Análise e mitigação de vulnerabilidades

Visão geral

CVE-2026-132131 is a path-scoped middleware bypass vulnerability in @fastify/middie caused by array mount-path type confusion. Affected versions are >= 8.3.0 and <= 9.3.6 (npm package @fastify/middie). The vulnerability was disclosed on November 18, 2026, via a GitHub Security Advisory published by maintainer mcollina. It carries a CVSS v3.1 base score of 7.4 (High) (GitHub Advisory).

Detalhes técnicos

The root cause is improper validation of input type (CWE-1287): the internal sanitizePrefixUrl helper is designed to operate on strings, but use() also accepts an array of mount paths and passes the array directly to this helper without type checking. Because JavaScript string operations silently no-op on arrays, trailing slashes on path elements (e.g., /secret/) are not stripped, and elements that are exactly / are dropped entirely. The resulting route-matching regular expression fails to match subroutes such as /secret/data, causing Fastify's router to dispatch the request to the handler while completely skipping the path-scoped middleware (authentication, authorization, rate limiting). The vulnerability is triggered when an application calls use(['path/', ...], securityMiddleware) — no authentication or special privileges are required by the attacker (GitHub Advisory).

Impacto

Successful exploitation allows an unauthenticated network attacker to bypass path-scoped security middleware — including authentication, authorization, and rate-limiting controls — and directly invoke protected route handlers. This results in high confidentiality and integrity impact: attackers can read restricted data and perform unauthorized write or modification operations on resources that should have been protected. Availability is not directly impacted, but the bypass could enable further lateral movement or privilege escalation within the application depending on what the unprotected handlers expose (GitHub Advisory).

Explorabilidade

The GitHub Security Advisory includes sufficient detail (specific trigger configuration and request path) to reproduce the vulnerability, and Feedly classifies it as a proof-of-concept with medium confidence. No exploit code is publicly available, and there is no evidence of in-the-wild exploitation at this time. The CVE status is currently "Reserved" and no EPSS score or CISA KEV listing has been recorded. Attack complexity is rated High, reflecting the requirement that the target application must specifically use array-based mount paths with trailing-slash elements or / entries (GitHub Advisory).

Etapas de exploração

  1. Reconnaissance: Identify applications using @fastify/middie versions 8.3.0–9.3.6 that mount security middleware via use() with an array of paths (e.g., fastify.use(['/secret/', '/admin/'], authMiddleware)). This configuration may be introduced indirectly when a plugin prefix ending in / is joined to a path.
  2. Identify protected routes: Enumerate API endpoints or routes that should be protected by the path-scoped middleware (e.g., /secret/data, /admin/users).
  3. Send unauthenticated request to subroute: Issue a plain HTTP request (e.g., GET /secret/data) without any authentication credentials or tokens.
  4. Bypass achieved: Because the compiled route-matching regex fails to match /secret/data (due to the trailing slash surviving normalization), the middleware is skipped entirely while Fastify's router still dispatches the request to the handler, returning protected data or performing privileged operations without any authorization check (GitHub Advisory).

Indicadores de compromisso

  • Network: Unauthenticated HTTP requests to routes that should require authentication (e.g., GET /secret/data, POST /admin/action) without Authorization headers or session tokens; absence of 401/403 responses for such requests in access logs.
  • Logs: Application access logs showing successful 2xx responses to protected subroutes from clients lacking valid credentials; absence of middleware-generated log entries (e.g., auth checks) for requests to protected paths.
  • Application Behavior: Unexpected data exposure or unauthorized modifications on routes that are supposed to be gated by @fastify/middie-mounted middleware; rate-limiting controls not triggering on high-frequency requests to protected endpoints.

Mitigação e soluções alternativas

Upgrade @fastify/middie to v9.3.7 or later, which fixes the type confusion by properly handling array inputs in the sanitizePrefixUrl helper. If an immediate upgrade is not possible, two workarounds are available: (1) enforce authorization in a Fastify hook such as preHandler that runs after the router resolves the request, rather than relying solely on path-scoped middleware; and (2) avoid using array mount paths with trailing-slash elements or / entries for any security-critical middleware (GitHub Advisory).

Reações da comunidade

The advisory was published by Fastify maintainer mcollina, with UlisesGascon serving as remediation reviewer and manus-pi credited as the reporter. No broader media coverage or notable community commentary beyond the official advisory has been identified at this time (GitHub Advisory).

Recursos adicionais

  • GitHub Advisory — Official security advisory for GHSA-hfwp-44m5-9364
  • npm Package — @fastify/middie npm package page for version verification

Origem: Este relatório foi gerado usando IA

Relacionado JavaScript Vulnerabilidades:

CVE ID

Gravidade

Pontuação

Tecnologias

Nome do componente

Exploit CISA KEV

Tem correção

Data de publicação

GHSA-mp5r-736v-j8x9HIGH7.5
  • JavaScript logoJavaScript
  • @react-router/dev
NãoSimNov 18, 2026
GHSA-j9x8-49mc-xpghHIGH7.5
  • JavaScript logoJavaScript
  • mercurius
NãoSimNov 18, 2026
CVE-2026-132131HIGH7.4
  • JavaScript logoJavaScript
  • @fastify/middie
NãoSimNov 18, 2026
CVE-2026-132128HIGH7.4
  • JavaScript logoJavaScript
  • @fastify/middie
NãoSimNov 18, 2026
CVE-2026-132133MEDIUM4.8
  • JavaScript logoJavaScript
  • @fastify/middie
NãoSimNov 18, 2026

Avaliação Gratuita de Vulnerabilidades

Avalie a sua postura de segurança na nuvem

Avalie suas práticas de segurança em nuvem em 9 domínios de segurança para avaliar seu nível de risco e identificar lacunas em suas defesas.

Avaliação de solicitação

Recursos adicionais da Wiz

Marque uma demonstração personalizada

Pronto para ver a Wiz em ação?

"A melhor experiência do usuário que eu já vi, fornece visibilidade total para cargas de trabalho na nuvem."
David EstlickCISO
"A Wiz fornece um único painel de vidro para ver o que está acontecendo em nossos ambientes de nuvem."
Adam FletcherDiretor de Segurança
"Sabemos que se a Wiz identifica algo como crítico, na verdade é."
Greg PoniatowskiChefe de Gerenciamento de Ameaças e Vulnerabilidades