Improper Validation of Specified Type of Input Affecting fastify package, versions <5.12.2


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.3% (23rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-FASTIFY-19639041
  • published7 Sept 2026
  • disclosed4 Sept 2026
  • creditschecthellraiser606

Introduced: 4 Sep 2026

NewCVE-2026-84469  (opens in a new tab)
CWE-1287  (opens in a new tab)

How to fix?

Upgrade fastify to version 5.12.2 or higher.

Overview

fastify is an overhead web framework, for Node.js.

Affected versions of this package are vulnerable to Improper Validation of Specified Type of Input via the route schema handling in lib/route.js, lib/schemas.js, and lib/validation.js. An attacker can reach a route handler with arbitrary input by sending a request to an endpoint that uses false as a deny-all schema for body, querystring, params, headers, or the query alias. Because those schemas were treated as absent when evaluated for JavaScript truthiness, Fastify skipped validator compilation and let the request proceed to the handler, allowing unauthenticated access to routes that were intended to reject every request.

Workarounds

  • Express a deny-all request schema with an always-failing object schema such as { "not": {} } instead of the boolean false, so the route still rejects requests before they reach the handler.
  • Reject the request in an onRequest hook, so unauthenticated clients are blocked before route handling even if a request-part schema was defined with false.

CVSS Base Scores

version 4.0
version 3.1