CVE-2026-120216

fastify vulnerable to Denial of Service via uncaught exception on handlerTimeout with streaming responses

Published Nov 2, 2026 CVSS 3.1 · 5.9 Medium EPSS < 1% KEV · Not listed
Description
fastify is a web framework for Node.js. In versions 5.8.0 through 5.12.7, when the server is configured with a nonzero handlerTimeout and a route returns a streaming response, a request whose stream has already sent its headers but stays open past the timeout crashes the server. When the timeout fires, Fastify tries to send a new error response on a response that has already started, raising an uncaught ERR_HTTP_HEADERS_SENT that terminates the Node.js process and interrupts any other in-flight requests. An unauthenticated remote client can trigger this with a single request to an affected streaming endpoint, so the impact is availability only, and exploitation requires the non-default handlerTimeout to be set. The default handlerTimeout of 0 is not affected. The issue is fixed in fastify 5.12.8, and users should upgrade to 5.12.8 or later. As a workaround, set handlerTimeout to 0, which disables the affected timeout path.

Analysis

AI-generated

Technical impact

Fastify exposes an uncaught exception when a streaming response starts, then remains open beyond the configured handlerTimeout. When the timeout fires, Fastify attempts to send a second error response on a response that has already begun, which triggers an ERR_HTTP_HEADERS_SENT exception and crashes the Node.js process. This failure is confined to availability, with no data disclosure or modification. The weakness corresponds to improper exception handling and is identified as CWE-248.

Affected Systems

The issue affects releases of the Fastify framework from version 5.8.0 up to and including 5.12.7. Users running any of these versions on Node.js applications with non‑default handlerTimeout settings are impacted. The default handlerTimeout of 0 is not affected.

Risk and Exploitability

The CVSS v3 score is 5.9, indicating a moderate severity. The EPSS metric is not available, and the vulnerability is not listed in CISA’s KEV catalog, suggesting that there are no publicly known exploits at the time of analysis. Because the flaw requires a non‑zero handlerTimeout, an attacker must first be able to send a request to a streaming endpoint with a long‑running stream; this can be done by any unauthenticated external client. The attack can be launched remotely and will terminate the process, disrupting all other in‑flight requests. The overall risk is moderate if non‑default timeouts are used; if the framework runs with the default timeout, the risk is effectively zero.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Fastify to version 5.12.8 or later to apply the vendor fix.
  • If upgrading is not immediately possible, set the handlerTimeout configuration value to 0, which disables the timeout path that triggers the crash.
  • For applications that must retain a timeout, review all streaming routes and consider lowering the timeout or isolating the routes behind a separate process or container so that a crash does not affect the entire service.

Generated by OpenCVE AI on November 2, 2026 at 12:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Fastify
Fastify fastify
Vendors & Products Fastify
Fastify fastify
Type Values Removed Values Added
Description fastify is a web framework for Node.js. In versions 5.8.0 through 5.12.7, when the server is configured with a nonzero handlerTimeout and a route returns a streaming response, a request whose stream has already sent its headers but stays open past the timeout crashes the server. When the timeout fires, Fastify tries to send a new error response on a response that has already started, raising an uncaught ERR_HTTP_HEADERS_SENT that terminates the Node.js process and interrupts any other in-flight requests. An unauthenticated remote client can trigger this with a single request to an affected streaming endpoint, so the impact is availability only, and exploitation requires the non-default handlerTimeout to be set. The default handlerTimeout of 0 is not affected. The issue is fixed in fastify 5.12.8, and users should upgrade to 5.12.8 or later. As a workaround, set handlerTimeout to 0, which disables the affected timeout path.
Title fastify vulnerable to Denial of Service via uncaught exception on handlerTimeout with streaming responses
Weaknesses CWE-248
References
Metrics cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
openjs
Published
Updated
Nov 2, 2026, 4:56 PM
Reserved
Oct 31, 2026, 4:06 PM
Status
Awaiting Analysis
Published
Nov 2, 2026, 11:17 AM
Modified
Nov 2, 2026, 5:17 PM
Severity
Moderate
Public date
Nov 2, 2026, 11:08 AM