{"id":"CVE-2026-120215","title":"@fastify/cors vulnerable to Denial of Service on a CORS preflight with the onSend hook","summary":"@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 ca…","severity":"low","cvss":3.7,"cvssVector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","cvssSource":"cna","cwe":["CWE-248"],"vendor":"@fastify/cors","product":"@fastify/cors","affected":["@fastify/cors >= 8.2.0 < 11.4.0"],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-11-02T17:03:55.457723Z"},"published":"2026-11-02","updated":"2026-11-02","sourceUpdated":"2026-11-02T17:04:11.417Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-120215","references":[{"url":"https://github.com/fastify/fastify-cors/security/advisories/GHSA-8c3j-mm64-257c"},{"url":"https://cna.openjsf.org/security-advisories.html"}],"tags":["cve.org"],"epss":0.00291,"epssPercentile":0.21837,"ingestedAt":"2026-11-05T19:30:42.717Z","slug":"CVE-2026-120215","body":"## Overview\n\n@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.\n\n## Affected\n\n- `@fastify/cors >= 8.2.0 < 11.4.0`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"sunlit","depthScore":20,"depthScoreParts":{"impact":20.4,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}