Y2
Public vulnerability disclosure

CVE-2026-120215

@fastify/cors vulnerable to Denial of Service on a CORS preflight with the onSend hook

publishedCWE-248

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

Technical severity3.7 lowCVSS 3.1 · CNA: openjs
Published2026-11-02Source updated 2026-11-02
Collected2026-11-022 attributed sources

Fixes and workarounds

No remediation reported in collected sources.

Missing remediation information is not evidence that no patch exists.

Affected products and versions

Affected products, source version ranges and reporting authorities
ProductVersionsAuthority
@fastify/cors
@fastify/cors
@fastify/cors
npm
≥ 8.2.0; < 11.4.0 (affected, semver)
11.4.0 (unaffected, semver)
Other versions: unaffected
CNA: openjs

Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.

CVSS assessments

CVSS scores, vectors and reporting authorities
Version / scoreVectorAuthority
3.1 / 3.7
low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:LCNA: openjs
3.1 / 3.7
low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:LNVD: ce714d77-add3-4f53-aff5-83d477b104bb

Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

References