Denial of service in @fastify/cors preflight with onSend hook
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Partial Red Hat: 1 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-248.
Summary
@fastify/cors versions from 8.2.0 before 11.4.0 are affected. Applications that register the plugin with the non-default onSend hook option crash on CORS preflight requests because an uncaught exception (CWE-248) is thrown when response headers are written twice. An unauthenticated remote client can trigger it with a single OPTIONS preflight request, which can terminate the Node.js process when no process-level handler is installed, so the impact is limited to availability.
Written with Claude Haiku 5.5 from the sources below · 2026-11-04
Description from the CNA
@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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| @fastify/cors | @fastify/cors | 8.2.0 to before 11.4.0 | 11.4.0 | Patch available | CNA |
- @fastify/cors Vendor@fastify/cors Affected 8.2.0 to before 11.4.0 Fixed in 11.4.0 Patch available CNA
Remediation
Upgrade @fastify/cors to version 11.4.0 or later, where onSend is rejected at registration. As a workaround, use a hook other than onSend, such as the default onRequest, or set preflight to false. Red Hat lists no available fix plan for Red Hat OpenShift Dev Spaces.
Written with Claude Haiku 5.5 from the sources below · 2026-11-04
- Fix · CNA @fastify/cors (@fastify/cors) Fixed in 11.4.0
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat OpenShift Dev Spaces | Affected | No fix yet: Fix deferred |
Timeline
- 2026-11-02 Threatist record created from CVE-2026-120215
- 2026-11-02 CISA SSVC decision points changed
- 2026-11-04 Affected versions changed · Red Hat
- 2026-11-04 CVSS score added · Red Hat
References
Sources
- CVE-2026-120215 · CVE Program
- CVE-2026-120215 · NVD
- FIRST EPSS
- CVE-2026-120215 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences