CVE-2026-76169: Fastify Authentication Bypass via Malformed URLs

fastify Updated 01 Oct 2026

Summary

30/09/2026
Yes i
High
7.5

CVE-2026-76169: fastify vulnerable to authentication bypass via malformed URLs reaching encapsulated not-found handlers. Affects fastify versions >= 4.0.0, < 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Fastify is a web framework for Node.js that is designed to be fast and low overhead. It provides a robust set of features for building web applications and APIs, including routing, middleware support, and plugin architecture. However, it has been identified that certain malformed URLs can lead to an authentication bypass, compromising the security of applications that rely on Fastify for handling requests.

Vulnerability Detail

The vulnerability arises when Fastify routes a malformed URL under one plugin prefix to the custom not-found handler of a different sibling plugin. This behavior allows the last registered handler to be invoked while skipping the preHandler declared in its setNotFoundHandler. As a result, an unauthenticated request to a public prefix can access an authentication-protected not-found handler registered under a different prefix, thereby breaching prefix encapsulation and bypassing authentication mechanisms. This issue can lead to unauthorized access to sensitive data returned by private or tenant fallback handlers.

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

As a temporary workaround, reject malformed request targets before they reach the application. This can be done at an upstream proxy or gateway. Additionally, avoid relying on a not-found handler to serve protected data. Implementing a global onRequest authentication hook will not mitigate this issue, as malformed URLs bypass it.

Conclusion

In summary, CVE-2026-76169 is a significant vulnerability in Fastify that can lead to authentication bypass through malformed URLs. It is crucial for developers using Fastify to update to version 5.12.2 or later to mitigate this risk. Implementing additional workarounds can further enhance security until the update is applied.

See every vulnerability recorded for fastify →

Share this vulnerability

FAQ

CVE-2026-76169 is a vulnerability in Fastify that allows authentication bypass through malformed URLs, potentially exposing sensitive data.

If your application uses Fastify and has authentication-protected not-found handlers, this vulnerability could allow unauthorized users to access sensitive information.

The vulnerability affects Fastify versions prior to 5.12.2. It is recommended to upgrade to this version or later.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit the Vulert playground at Vulert Scanner to check if your application is affected without needing to sign up.

The CVSS score for this vulnerability is 7.5, 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