CVE-2026-84504: Fastify Request Body Replacement Vulnerability

fastify Updated 01 Oct 2026

Summary

30/09/2026
Yes i
High
8.1

CVE-2026-84504: fastify vulnerable to request body replacement via an async validation result collision. Affects fastify versions < 5.12.2. Fixed in 5.12.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Fastify is a web framework for Node.js that is designed to be highly performant and low overhead. It allows developers to build web applications and APIs with ease, supporting a wide range of plugins and features. However, Fastify has a vulnerability that arises when using asynchronous validation schemas, which can lead to unauthorized data manipulation and security breaches.

Vulnerability Detail

The vulnerability in Fastify occurs due to the way it handles validation results from asynchronous JSON Schema validators. When a request part is validated using an async schema that returns a 'value' property, Fastify incorrectly replaces the entire request part with this nested value. This can allow an attacker to control the request payload, leading to unauthorized state changes or data disclosure. The issue is particularly concerning when the application relies on the validated request body for critical operations, as it can bypass the intended validation checks.

How To Fix

Latest published version: 5.12.7 as of 22 Oct 2026

npm install fastify@5.12.7

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.12.2

This is the first release that contains the fix.

npm install fastify@5.12.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading is not immediately feasible, consider avoiding the use of asynchronous request schemas. Alternatively, implement security-sensitive checks in an 'onRequest' or 'preHandler' hook instead of relying solely on the schema-validated request part. Custom async validator compilers should signal failure by throwing an error rather than returning an error object.

Conclusion

The vulnerability CVE-2026-84504 in Fastify poses significant risks to applications that utilize asynchronous validation schemas. It is crucial to update to the patched version or implement workarounds to mitigate potential security threats. Regular monitoring for vulnerabilities using tools like Vulert can help maintain application security.

See every vulnerability recorded for fastify →

Share this vulnerability

FAQ

CVE-2026-84504 is a vulnerability in the Fastify web framework that allows for request body replacement through asynchronous validation result collisions.

This vulnerability can lead to unauthorized state changes or data disclosure if your application relies on the validated request body for critical operations.

All versions of Fastify prior to 5.12.2 are affected by this vulnerability.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground without any signup.

The CVSS score for this vulnerability is 8.1, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for fastify.

How To Fix

Latest published version: 5.12.7 as of 22 Oct 2026

npm install fastify@5.12.7

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.12.2

This is the first release that contains the fix.

npm install fastify@5.12.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback