Katalog CVE

CVE-2026-120215

NiskieCVSS 3.7
Opublikowano: Przetłumaczono: NVD NIST

Streszczenie

Podatność w pluginie @fastify/cors (wersje 8.2.0–11.3.x) dotyczy aplikacji, które rejestrują plugin z niestandardową opcją onSend. Żądanie preflight CORS (OPTIONS z nagłówkami Origin i Access-Control-Request-Method) powoduje ponowne wejście w pipeline wysyłania odpowiedzi i wyjątek ERR_HTTP_HEADERS_SENT, co może zakończyć proces Node.js, jeśli nie ma globalnego handlera błędów.

Ocena ryzyka

Nieuwierzytelniony zdalny klient może jednym żądaniem preflight wywołać awarię procesu Node.js, powodując niedostępność usługi (DoS). Wpływ ogranicza się do dostępności i wymaga użycia niestandardowej konfiguracji onSend.

Rekomendacja

Zaktualizuj @fastify/cors do wersji 11.4.0 lub nowszej, w której onSend nie jest już akceptowaną opcją hooka. Jako obejście użyj innego hooka (np. domyślnego onRequest) lub ustaw preflight na false.

Powiązane podatności

Oryginalny opis (angielski, źródło NVD)

@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.

Dane podatności pochodzą z NVD (NIST) · CISA KEV · EPSS