Alta

fastify vulnerable to authentication bypass via malformed URLs reaching encapsulated not-found handlers

  • Publicada: 30.09.2026
  • Actualizado: 11.10.2026 10:22

Impact

Fastify routes a malformed URL under one plugin prefix to the custom not-found handler of a different sibling plugin, invoking the handler registered last and skipping the preHandler declared in its setNotFoundHandler(). When the request method has no route in the main router, a malformed request target reaches Fastify's internal not-found router before URL decoding and is dispatched through a single shared handler pointer, regardless of prefix and without the normal request lifecycle. An unauthenticated request to a public prefix can therefore reach an authentication-protected not-found handler registered under a different prefix and receive its full response, breaking prefix encapsulation and bypassing the authentication hook. Applications whose private or tenant fallbacks return protected data from a not-found handler are affected.

Patches

Patched in fastify 5.12.2. Malformed URLs are now routed through the configured onBadUrl and onMaxParamLength handlers so they fail closed before any application not-found handler runs, and the shared not-found handler pointer has been removed.

Workarounds

Reject malformed request targets before they reach the application, for example at an upstream proxy or gateway, and do not rely on a not-found handler to serve protected data. A global onRequest authentication hook does not mitigate this, because the malformed-URL path skips it.

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Paquete de npm fastify >= 4.0.0, < 5.12.2 5.12.2

Referencias

Puntuación CVSS 7.5/10
Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Debilidad (CWE)
CWE-288
Plataforma
npm
Paquete
fastify
Publicada
30.09.2026
Actualizado
11.10.2026 10:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-p68q-wchp-6fh7 - CC BY 4.0

Historial de vulnerabilidades: fastify

Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Todas (16) en el archivo
Entradas en total
16
Primera → última
07.2018 09.2026
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Alta 8
  • Media 7
  • Baja 1

Divulgaciones por año

  1. 2018: 1
  2. 2019: 0
  3. 2020: 1
  4. 2021: 0
  5. 2022: 2
  6. 2023: 0
  7. 2024: 0
  8. 2025: 1
  9. 2026: 11
Gravedad:
  1. fastify vulnerable to authentication bypass via malformed URLs reaching encapsulated not-found handlers esta entrada
    Alta · 7.5 CVE-2026-76169 >= 4.0.0, < 5.12.2 5.12.2
  2. Alta · 7.5 CVE-2025-32442 >= 5.0.0, < 5.3.2, >= 4.29.0, < 4.29.1 5.3.2, 4.29.1
  3. Alta · 7.5 CVE-2022-39288 >= 4.0.0, < 4.8.1 4.8.1

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.