Skip to main content

Fastify EUVDEUVD-2026-70988

| CVE-2026-76169 HIGH
Authentication Bypass Using an Alternate Path or Channel (CWE-288)
2026-09-04 openjs GHSA-p68q-wchp-6fh7
7.5
CVSS 3.1 · Vendor: openjs
View

Attack ChainAIDerived

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

  1. Access
    Send malformed URL under public plugin prefix
  2. Delivery
    Trigger not-found router dispatch before URL decoding
  3. Exploit
    Shared handler pointer ignores plugin-prefix scoping
  4. Execution
    preHandler auth hook skipped for private plugin
  5. Persist
    Private plugin not-found handler invoked unauthenticated
  6. Impact
    Full protected response returned to attacker

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Alternate path authentication
Exploitation Conditions

Three concurrent conditions must exist in the target application: (1) Fastify version 4.0.0-5.12.1 is in use; (2) the application registers at least two sibling plugins under different prefixes using fastify.register(), with at least one prefix publicly reachable by the attacker; (3) the private sibling plugin defines a custom not-found handler via setNotFoundHandler() and relies on a preHandler hook for authentication rather than inline auth logic inside the handler body. If the private plugin has no custom not-found handler, or if authentication is enforced inside the handler function itself rather than as a preHandler hook, the bypass does not apply. The attacker requires no credentials, no prior session state, and no user interaction - only network access to the public plugin's prefix and the ability to send a malformed URL path.

Impact

The vendor CVSS 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) is assessed as accurate. The attack is network-reachable, requires no authentication or user interaction, and yields full confidentiality loss from the private handler's response. The practical attack surface is narrowed by the required application architecture: both a publicly-accessible plugin prefix and a private sibling plugin with a custom not-found handler whose authentication is implemented exclusively as a preHandler hook must coexist. This is not an exotic configuration - it is precisely the pattern Fastify's documentation promotes for role-separated APIs - so the affected population is non-trivial. No CISA KEV listing and no POC are present in the input data, and EPSS data is absent, so exploitation frequency cannot be quantified. However, the low complexity and zero-privilege requirement mean that once the pattern is known, mass scanning for vulnerable endpoints is straightforward. The fix is a targeted upgrade with no breaking changes noted, making prompt remediation the clear priority rather than workaround-reliance.

Exploit ScenarioDerived

An attacker identifies a Fastify application where a private plugin registered under /api/internal has a custom not-found handler protected by a preHandler JWT-validation hook. The attacker sends a crafted malformed URL - such as a path with invalid percent-encoding - under the public sibling prefix /api/public/%invalid/resource. The not-found router resolves the shared handler pointer before URL decoding and dispatches the request to the private plugin's not-found handler, bypassing the JWT hook entirely. The private handler returns an internal API schema or sensitive error payload, which the unauthenticated attacker reads in full.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 PoC candidate (unverified) Patch available 0.5% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Sep 04, 2026

Authentication hook bypass in Fastify 4.0.0-5.12.1 allows unauthenticated network attackers to reach a private plugin's custom not-found handler by sending a malformed URL under a sibling public plugin's prefix. The internal not-found router dispatches malformed paths through a single shared handler pointer before URL decoding, ignoring plugin-prefix scoping and skipping the preHandler lifecycle - the mechanism most Fastify applications use to enforce JWT or session authentication. No public exploit code has been identified at time of analysis, but the AV:N/AC:L/PR:N/UI:N vector means any reachable Fastify deployment meeting the required architecture is exploitable without friction.

RemediationAI

The primary fix is upgrading to Fastify 5.12.2 or later, which corrects the internal not-found router to respect plugin-prefix scoping and invoke the full handler lifecycle - including preHandler hooks - before dispatching 404 responses. The advisory is at https://github.com/fastify/fastify/security/advisories/GHSA-p68q-wchp-6fh7. If immediate upgrade is not feasible, the most effective compensating control is to move authentication logic out of preHandler hooks on not-found handlers and inline it directly inside the setNotFoundHandler callback body, so the check executes regardless of lifecycle bypass. This workaround introduces code duplication and risks auth-logic drift if the hook is later updated without updating the inline copy. A secondary mitigation is to avoid registering sensitive not-found handlers on private scopes when public sibling scopes exist, instead consolidating fallback handling at the application root level. Neither workaround addresses the underlying routing defect.

Affected VersionsENISA

fastify 4.0.0 <5.12.2

Affected Packages

npm fastify fix: 5.12.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

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

Technical ContextAI · show details

Fastify is a high-performance Node.js HTTP framework whose core design feature is encapsulated plugin scoping: each plugin registered via fastify.register() carries its own prefix, lifecycle hooks (including preHandler for authentication), and optionally a custom not-found handler set via setNotFoundHandler(). In versions 4.0.0 through 5.12.1, the internal 404-dispatch code maintains a single shared handler pointer across sibling plugin scopes. When an inbound URL is malformed, the router resolves this shared pointer before URL decoding occurs, bypassing the normal per-scope lifecycle selection. As a result, the preHandler hooks attached to the matched private plugin's not-found handler are never invoked. The root cause class is CWE-288 (Authentication Bypass Using an Alternate Path or Channel): a secondary dispatch path - the pre-decode malformed-URL route - circumvents the primary authentication mechanism. The affected CPE is cpe:2.3:a:fastify:fastify:*:*:*:*:*:*:*:* across the stated range, reported by the OpenJS Foundation CNA.

Know when Fastify 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 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 7.5 HIGH

Network-exploitable with no auth and low complexity; impact is confidentiality-only since the attacker reads the protected handler response without modifying application state.

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

Primary rating from Vendor (openjs).

CVSS VectorVendor: openjs

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

Lifecycle Timeline

2
Patch available
Sep 04, 2026 - 11:02 EUVD
CVE Published
Sep 04, 2026 - 09:51 cve.org
HIGH 7.5

DescriptionCVE.org

fastify versions >= 4.0.0 and before 5.12.2 can route a malformed URL sent under one plugin prefix to the custom not-found handler of a different sibling plugin, and invoke it without the preHandler hook declared for that handler. The internal not-found router for encapsulated handlers dispatches malformed paths through a single shared handler pointer before URL decoding, ignoring the prefix and skipping the selected handler's normal lifecycle. An unauthenticated attacker can therefore reach an authentication-protected private fallback through an unrelated public prefix and read its full response, bypassing the authentication hook and breaking prefix encapsulation. Users should upgrade to fastify 5.12.2 or later.

Technical POC Analysis

CWE-288: Authentication Bypass Using an Alternate Path or Channel.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Latest POC

1 PoC candidate from github (unverified)

Sign in to open the public PoC links collected for this CVE.

Executive ViewAI

Why It Matters

Fastify versions 4.0.0 through 5.12.1 contain an authentication bypass vulnerability allowing unauthenticated attackers to access protected endpoints through malformed URL routing that circumvents authentication hooks. Organizations running affected versions face direct risk of unauthorized access to sensitive application functionality without a vendor patch currently available.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Network segmentation to restrict exposure of affected applications to trusted networks only; (2) Web Application Firewall rules to reject malformed URL requests targeting sibling plugin paths; (3) Enhanced authentication enforcement in plugin preHandler middleware independent of router dispatch; (4) Real-time monitoring and alerting for successful requests reaching private plugin handlers or unexpected 404 patterns.

Threat Intelligence Overview

EPSS Score
0.5%
Top 57% exploitable
Prevalence
Medium
popular Node.js framework, significant but not dominant market share
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub VulDB

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 HIGH
CISA KEV No
Public POC Yes
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

59
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +38
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

CVE-2023-31999 HIGH POC
8.8 Jul 04

All versions of @fastify/oauth2 used a statically generated state parameter at startup time and were used across all req

CVE-2021-22964 HIGH POC
8.8 Oct 14

A redirect vulnerability in the `fastify-static` module version >= 4.2.4 and < 4.4.1 allows remote attackers to redirect

CVE-2025-32442 HIGH POC
7.5 Apr 18

Fastify is a fast and low overhead web framework, for Node.js. Rated high severity (CVSS 7.5), this vulnerability is rem

CVE-2020-8136 HIGH POC
7.5 Mar 20

Prototype pollution vulnerability in fastify-multipart < 1.0.5 allows an attacker to crash fastify applications parsing

CVE-2018-3711 HIGH POC
7.5 Jun 07

Fastify node module before 0.38.0 is vulnerable to a denial-of-service attack by sending a request with "Content-Type: a

CVE-2020-8192 MEDIUM POC
6.5 Jul 30

A denial of service vulnerability exists in Fastify v2.14.1 and v3.0.0-rc.4 that allows a malicious user to trigger reso

CVE-2021-22963 MEDIUM POC
6.1 Oct 14

A redirect vulnerability in the fastify-static module version < 4.2.4 allows remote attackers to redirect users to arbit

CVE-2026-6556 CRITICAL
9.1 Jun 30

Authorization bypass in the @fastify/express middleware-compatibility plugin (versions 4.0.6 and earlier) lets unauthent

CVE-2026-33808 CRITICAL
9.1 Apr 15

Authentication bypass in @fastify/express v4.0.4 and earlier allows remote unauthenticated attackers to access protected

CVE-2026-33807 CRITICAL
9.1 Apr 15

Middleware bypass in Fastify Express plugin (fastify/express) allows complete circumvention of authentication, authoriza

CVE-2022-41919 HIGH
8.8 Nov 22

Fastify is a web framework with minimal overhead and plugin architecture. Rated high severity (CVSS 8.8), this vulnerabi

CVE-2026-2880 HIGH
8.2 Feb 27

Authentication and authorization bypass in @fastify/middie (Node.js middleware library for Fastify) allows remote unauth

Vendor StatusVendor

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