{"id":"CVE-2026-120215","state":"PUBLISHED","title":"@fastify/cors vulnerable to Denial of Service on a CORS preflight with the onSend hook","description":"@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.","publishedAt":"2026-11-02T10:20:47.667Z","updatedAt":"2026-11-02T17:04:11.417Z","severity":{"score":3.7,"label":"Low","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","source":"openjs"},"assigner":"openjs","products":["@fastify/cors @fastify/cors"],"affected":[{"vendor":"@fastify/cors","product":"@fastify/cors","packageURL":"pkg:npm/@fastify/cors","defaultStatus":"unaffected","versions":[{"version":"8.2.0","status":"affected","lessThan":"11.4.0","versionType":"semver"},{"version":"11.4.0","status":"unaffected","versionType":"semver"}]}],"references":["https://github.com/fastify/fastify-cors/security/advisories/GHSA-8c3j-mm64-257c","https://cna.openjsf.org/security-advisories.html"],"weaknesses":["CWE-248"],"ingestedAt":"2026-11-02T17:18:06.061Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/120xxx/CVE-2026-120215.json","commit":"a7f0fe327a45a3987cfa4c4698ef947001868432","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-120215","state":"PUBLISHED","datePublished":"2026-11-02T10:20:47.667Z","dateUpdated":"2026-11-02T17:04:11.417Z","assignerShortName":"openjs","assignerOrgId":"ce714d77-add3-4f53-aff5-83d477b104bb","dateReserved":"2026-10-31T15:01:18.624Z"},"containers":{"cna":{"title":"@fastify/cors vulnerable to Denial of Service on a CORS preflight with the onSend hook","descriptions":[{"lang":"en","value":"@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."}],"affected":[{"vendor":"@fastify/cors","product":"@fastify/cors","packageURL":"pkg:npm/@fastify/cors","defaultStatus":"unaffected","versions":[{"version":"8.2.0","status":"affected","lessThan":"11.4.0","versionType":"semver"},{"version":"11.4.0","status":"unaffected","versionType":"semver"}]}],"references":[{"url":"https://github.com/fastify/fastify-cors/security/advisories/GHSA-8c3j-mm64-257c"},{"url":"https://cna.openjsf.org/security-advisories.html"}],"metrics":[{"format":"CVSS","cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","baseScore":3.7,"baseSeverity":"LOW"},"scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-248","lang":"en","description":"CWE-248: Uncaught Exception","type":"CWE"}]}],"providerMetadata":{"shortName":"openjs","orgId":"ce714d77-add3-4f53-aff5-83d477b104bb","dateUpdated":"2026-11-02T10:20:47.667Z"},"credits":[{"lang":"en","type":"reporter","value":"Ravin06"},{"lang":"en","type":"remediation developer","value":"mcollina"},{"lang":"en","type":"remediation reviewer","value":"UlisesGascon"}],"x_generator":{"engine":"cve-kit 1.0.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-11-02T17:03:55.457723Z","id":"CVE-2026-120215","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-11-02T17:04:11.417Z"}}]}}}