Skip to main content

@fastify/cors CVE-2026-120215

| EUVDEUVD-2026-115123 LOW
Uncaught Exception (CWE-248)
2026-11-02 openjs
3.7
CVSS 3.1 · Vendor: openjs
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach Fastify app over network
  2. Delivery
    Send OPTIONS preflight with Origin and Access-Control-Request-Method
  3. Exploit
    onSend hook calls reply.send, re-enters pipeline
  4. Execution
    Second writeHead throws uncaught ERR_HTTP_HEADERS_SENT
  5. Impact
    Node.js process terminates (availability loss)

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Exception handling completeness
Exploitation Conditions

Exploitation requires the target application to register @fastify/cors with the non-default hook: 'onSend' option while preflight remains enabled (the default). Only that configuration is affected; the default onRequest hook and any deployment with preflight: false are not. Process termination additionally requires that no process-level uncaughtException handler is installed to swallow the error. Key limiting factors: the vulnerable mode is non-default and, per the vendor, preflighted CORS never functioned in that configuration, so affected applications were already broken for preflight - narrowing the real-world exposure considerably despite the unauthenticated, single-request trigger. The fix in 11.4.0 removes onSend as an accepted hook value entirely, failing registration with a clear error instead of crashing at request time; the vendor states upgrading is the remedy, with workarounds being any other hook (e.g. the default onRequest) or setting preflight: false.

Impact

This is a low-priority, high-noise-floor issue rather than an urgent threat, and the signals are internally consistent. The vendor CVSS of 3.7 (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L) correctly reflects an availability-only denial of service: no confidentiality or integrity impact, and AC:H encodes that exploitation depends on a non-default configuration the attacker cannot influence. The vuln.today decision label is 'monitor,' the weakest urgency tier. No EPSS score is provided, so exploitation probability cannot be quantified from this data. KEV status is not indicated (not CISA-listed), and no public exploit or PoC reference is present - the two references are the GHSA advisory and the OpenJSF CNA page, which are advisories, not exploit code. The one point worth flagging is the AV:N/PR:N combination: while the network/unauthenticated metrics are real (a single preflight OPTIONS request from any remote client triggers the crash), the AC:H gate is doing heavy lifting - the flaw only manifests in applications explicitly registered with the non-default hook: 'onSend' option, and the advisory notes preflighted CORS never worked in that mode, so affected deployments were already non-functional for that path. Net: a genuine but narrow DoS affecting a small, misconfigured subset of deployments; prioritize routine patching, not emergency response.

Exploit ScenarioDerived

A remote, unauthenticated attacker sends a single CORS preflight - an OPTIONS request carrying Origin and Access-Control-Request-Method headers - to a Fastify application that registered @fastify/cors with the non-default hook: 'onSend' option. The plugin calls reply.send() from within the onSend hook, re-entering the send pipeline; the second writeHead throws ERR_HTTP_HEADERS_SENT as an uncaught exception, terminating the Node.js process if no process-level handler is installed. No public exploit code is identified, but the trigger is trivial to craft from the advisory description.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 02, 2026

CORS preflight handling in @fastify/cors 8.2.0 through 11.3.x can terminate the Node.js process when the plugin is registered with the non-default hook: 'onSend' option. On an OPTIONS request carrying Origin and Access-Control-Request-Method, the plugin calls reply.send from inside the onSend hook and re-enters Fastify's send pipeline, so a second write of the response headers throws ERR_HTTP_HEADERS_SENT; with no process-level handler installed, that uncaught exception kills the process. The trigger is a single unauthenticated request (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L, 3.7), but only the non-default onSend configuration with preflight enabled is exposed - the default onRequest hook and deployments with preflight: false are unaffected - so this is a low-priority availability issue rather than an urgent threat, and no public exploit code was identified at time of analysis.

RemediationAI

Upgrade @fastify/cors to 11.4.0 or later, where onSend is no longer an accepted hook value and registration fails with a clear error instead of crashing at request time; the vendor states that upgrading is the remedy. Advisory details are at https://github.com/fastify/fastify-cors/security/advisories/GHSA-8c3j-mm64-257c and https://cna.openjsf.org/security-advisories.html. If an immediate upgrade is not possible, the vendor-documented workarounds are to register the plugin with any other hook - for example the default onRequest - or to set preflight: false; note that preflight: false disables preflight handling entirely, so cross-origin clients sending preflighted requests will fail CORS checks, though the vendor notes preflighted CORS never worked in the onSend configuration anyway. Additionally, process termination only occurs when no process-level uncaughtException handler is installed, so such a handler limits the blast radius, but it treats the symptom rather than the double-write that causes it.

Affected VersionsENISA

@fastify/cors 8.2.0 <11.4.0

Affected Packages

euvd fastify_cors fix: 11.4.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

@fastify/cors is the official CORS plugin for the Fastify web framework, implemented as a hook that inspects incoming requests and, for OPTIONS preflight requests, answers them directly via reply.send. The class of defect is CWE-248 (Uncaught Exception): when the plugin is configured with hook: 'onSend', the reply has already entered Fastify's onSend serialization stage, and calling reply.send from within that stage re-enters the send pipeline, causing a second writeHead on the same response. Node.js throws ERR_HTTP_HEADERS_SENT at that point, and because the error escapes the request lifecycle as an uncaught exception, the runtime terminates unless a process-level handler catches it. The CPE entry (cpe:2.3:a:@fastify/cors:@fastify/cors) is version-agnostic; the actual affected range is the npm package >= 8.2.0 and < 11.4.0. The vendor notes that preflight never functioned in the onSend configuration, so this was already a broken deployment mode before it became a crash.

Know when Node.js gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (openjs) PRIMARY 3.7 LOW
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
vuln.today AI 3.7 LOW

Remote unauthenticated single request (AV:N/PR:N/UI:N), but AC:H because it only triggers under the non-default onSend configuration with no process handler; impact is availability-only (A:L).

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (openjs).

CVSS VectorVendor: openjs

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

1
Patch available
Nov 02, 2026 - 12:16 EUVD

DescriptionCVE.org

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

Threat Intelligence Overview

Prevalence
Medium
popular CORS plugin for Fastify, a common but not ubiquitous Node.js framework
Social Media
2
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Low

Priority Score

18
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +18
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2013-4660 MEDIUM POC
6.8 Jun 28

The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, whic

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy