Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate with low-privilege credentials
-
DeliveryIdentify route using Ajv async validator
-
ExploitCraft JSON body with schema-passing fields plus root `value` property containing unauthorized payload
-
InstallSubmit request to vulnerable Fastify endpoint
-
C2Schema validation passes on full body object
-
ExecuteFastify unwraps body.value and passes it to handler
-
ImpactHandler executes unauthorized operation or discloses restricted data
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
|
| Exploitation Conditions | Exploitation requires three concrete conditions to align simultaneously. First, the targeted Fastify route must be configured with a custom validator compiler that produces Ajv async validators (routes using synchronous validators are not affected). Second, the attacker must hold a valid low-privilege authenticated session - unauthenticated callers are excluded because PR:L is required per the CVSS vector. Third, the route must accept a JSON body and the attacker must be able to include a root-level |
| Impact | The provided CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N) yields a score of 8.1, which is broadly consistent with the described impact. Attack complexity is genuinely low once an attacker knows or discovers that a route uses Ajv async validators, since the only requirement is to embed a |
| Exploit ScenarioDerived | An authenticated attacker with a low-privilege account on a Fastify-based API sends a POST request to a restricted route. The JSON body is crafted so that the schema-validated object passes validation (e.g., contains expected required fields), but also includes a root-level |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 04, 2026
Schema authorization bypass in Fastify before 5.12.2 allows an authenticated low-privilege attacker to substitute an arbitrary body object in place of the schema-validated request body, enabling unauthorized state changes and data disclosure. The flaw arises because Fastify mishandles the resolved value from Ajv async validators: if the validated request body contains a root-level property named value, Fastify overwrites the body with that property's value before invoking the route handler, so the handler operates on a different object than the one that passed schema validation. No public exploit code has been identified at time of analysis, but the low attack complexity and network vector make this a meaningful risk for Fastify-based APIs.
RemediationAI
Upgrade Fastify to version 5.12.2 or later, which is the vendor-released patch confirmed in both the advisory text and the OpenJS CNA disclosure (https://github.com/fastify/fastify/security/advisories/GHSA-667r-xxjv-c9mm). If immediate upgrade is not feasible, a targeted workaround is to audit all routes that use Ajv async validators and add an explicit check in the handler or a preHandler hook that rejects any request body containing a root-level value key, or alternatively switch those routes to synchronous validators until the patch can be applied. Another compensating control is to add input normalization middleware that strips or renames the value key from all incoming JSON bodies, though this may break legitimate payloads that intentionally use that key name. Neither workaround eliminates the root cause and both carry operational risk; patching to 5.12.2 is the definitive fix.
Affected VersionsENISA
Affected Packages
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 that integrates Ajv for JSON Schema validation. It supports custom validator compilers that can return async validators following a value-result protocol, where a resolved promise's .value property is interpreted as the validated payload. The affected logic (CPE cpe:2.3:a:fastify:fastify:*:*:*:*:*:*:*:*) conflates the internal protocol object with the user-supplied request body: if the JSON body itself carries a value key at its root, Fastify mistakenly unwraps it and feeds body.value to the route handler instead of the full validated body. This is classified as CWE-20 (Improper Input Validation) - specifically, the framework fails to distinguish between its own internal result-wrapping protocol and attacker-controlled input keys, effectively allowing the schema validation step and the handler execution step to operate on different data.
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
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Network-reachable HTTP endpoint, low complexity once async-validator route is identified, authenticated low-privilege attacker; no availability impact per description.
Primary rating from Vendor (openjs).
CVSS VectorVendor: openjs
Lifecycle Timeline
2DescriptionCVE.org
fastify versions before 5.12.2 treat the object resolved by a successful Ajv async validator as the value result protocol used by custom validator compilers. If a request that passes its route schema contains a property named value at the root, fastify replaces the entire request body with that property's value before the handler runs, so the handler receives a different object than the one that satisfied the schema. An authenticated low-privilege caller can use this to make nested data replace the validated body and trigger an operation the route schema did not authorize, leading to unauthorized state changes and data disclosure. Users should upgrade to fastify 5.12.2 or later.
Blast Radius
ecosystem impact- 1 npm packages depend on fastify (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 5.12.2.
Technical POC Analysis
The bug is in Fastify's schema-validation result handling, not in Ajv.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Fastify web framework versions before 5.12.2 contain a validation bypass allowing authenticated users to inject malicious request bodies, enabling unauthorized system changes and data theft. While no public exploit code has been identified at time of analysis, this poses material risk for organizations using Fastify for sensitive API operations.
Apply vendor patch by upgrading Fastify to version 5.12.2 or later.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
All versions of @fastify/oauth2 used a statically generated state parameter at startup time and were used across all req
A redirect vulnerability in the `fastify-static` module version >= 4.2.4 and < 4.4.1 allows remote attackers to redirect
Fastify is a fast and low overhead web framework, for Node.js. Rated high severity (CVSS 7.5), this vulnerability is rem
Prototype pollution vulnerability in fastify-multipart < 1.0.5 allows an attacker to crash fastify applications parsing
Fastify node module before 0.38.0 is vulnerable to a denial-of-service attack by sending a request with "Content-Type: a
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
A redirect vulnerability in the fastify-static module version < 4.2.4 allows remote attackers to redirect users to arbit
Authorization bypass in the @fastify/express middleware-compatibility plugin (versions 4.0.6 and earlier) lets unauthent
Authentication bypass in @fastify/express v4.0.4 and earlier allows remote unauthenticated attackers to access protected
Middleware bypass in Fastify Express plugin (fastify/express) allows complete circumvention of authentication, authoriza
Fastify is a web framework with minimal overhead and plugin architecture. Rated high severity (CVSS 8.8), this vulnerabi
Authentication and authorization bypass in @fastify/middie (Node.js middleware library for Fastify) allows remote unauth
EUVD-2026-70984
GHSA-667r-xxjv-c9mm
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB