CVE-2026-120215
Publiée le 2026-11-02 · Dernière modification le 2026-11-02
Le plugin `@fastify/cors` pour le framework web Fastify est affecté dans les versions 8.2.0 à 11.3.x. Ce plugin gère le partage de ressources entre origines multiples (CORS) afin de contrôler quels domaines peuvent interagir avec votre API. La faille survient lorsque le plugin est configuré avec un hook `onSend` non par défaut, ce qui amène le serveur à tenter d'envoyer les en-têtes de réponse deux fois lors d'une requête de préflight CORS.
Un attaquant distant non authentifié peut faire planter le processus Node.js en envoyant une seule requête OPTIONS spécialement conçue, entraînant une perte temporaire de disponibilité. Cette vulnérabilité est relativement difficile à exploiter car elle nécessite que le serveur soit spécifiquement configuré avec le hook `onSend`. Aucune interaction utilisateur ni aucun identifiant ne sont requis pour déclencher le plantage.
DÉTAIL DU VECTEUR CVSS
RÉFÉRENCES
Description officielle du NVD (en anglais)
@fastify/cors is the CORS plugin for the Fastify web framework. In versions 8.2.0 through 11.3.x, an application that registers the plugin with the non-default onSend hook option crashes on a CORS preflight. On an OPTIONS request that carries the Origin and Access-Control-Request-Method headers, the plugin calls reply.send from inside the onSend hook and re-enters the send pipeline, so a second write of the response headers throws an uncaught ERR_HTTP_HEADERS_SENT that can terminate the Node.js process when no process-level handler is installed. An unauthenticated remote client can trigger this with a single preflight request, so the impact is availability only, and exploitation requires the non-default onSend configuration. The issue is fixed in @fastify/cors 11.4.0, where onSend is no longer an accepted hook value and registration fails with a clear error instead of crashing at request time, and users should upgrade to 11.4.0 or later. As a workaround, use any other hook such as the default onRequest, or set preflight to false.