CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-84504

CVE-2026-84504: Schema Validation Bypass via Async Validation Result Collision in Fastify

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 1, 2026·6 min read·22 visits

Executive Summary (TL;DR)

An API contract collision in Fastify's validation runner allows attackers to bypass JSON Schema validation by embedding nested, unvalidated payloads inside a root-level 'value' key, which is then promoted to the root request body.

An API contract mismatch in the Fastify web framework allows remote attackers to bypass schema validation when asynchronous schema validators are used. When a route uses async validation, the validator resolves with the raw request body. If the body contains a root-level key named 'value', the validation runner interprets this as a synchronous wrapper envelope, extracting and promoting the unvalidated nested content to the root level of request.body.

Vulnerability Overview

The Fastify web framework relies on an internal validation runner to parse and validate incoming client requests. This component compiles route-specific schemas to sanitize input before the payload reaches downstream application controllers. Under default conditions, this architecture prevents malicious or malformed data from causing type confusion, parameter injection, or logic flaws within handlers.

To accommodate a wide ecosystem of custom schema compilers, Fastify supports both synchronous and asynchronous validation interfaces. Synchronous compilers, such as Joi, return structured validation results inside an envelope object. In contrast, asynchronous compilers, such as Ajv when compiled with the $async: true directive, resolve directly with the successfully validated dataset rather than an envelope.

This architectural difference creates a critical attack surface within the request runner. When processing successful asynchronous resolutions, the framework's internal runner fails to isolate the raw validated payload from legacy synchronous envelope-parsing rules. Consequently, attackers can transmit structured payloads that deliberately collide with internal validation properties, resulting in complete validation bypass.

Root Cause Analysis

The core of the vulnerability lies in the legacy unwrapping function named answer() in Fastify's validation execution path. This function is designed to handle custom synchronous validators that return a metadata wrapper structured as { value, error }. If answer() detects an error key on its argument, it signals a validation failure, whereas if it detects a value key, it extracts the nested value to replace the current request.body object.

When a route uses an asynchronous validation compiler, the validator returns a Promise that resolves directly with the raw validated payload upon success. The validation runner handles this resolved payload by passing it straight into the legacy answer() wrapper function. This creates an unhandled type collision because the user-controlled, successfully validated request payload is now evaluated as if it were a synchronous compiler envelope.

If an attacker structures an input payload to contain a root-level property named value, the asynchronous schema validator verifies that the outer object meets the schema criteria and passes the object to the resolver. The runner then processes this validated object through answer(). Because the object contains a root-level value property, answer() extracts its nested contents and assigns them directly to request.body, bypassing all structural checks on the nested fields.

Code Analysis

The flaw is located in lib/validation.js where asynchronous validation promises are resolved and returned to the request lifecycle. The vulnerable path executes answer(res) on the resolved data, assuming it represents a validation wrapper.

Below is the code comparison between the vulnerable implementation and the patch:

// === VULNERABLE CODE ===
if (ret && typeof ret.then === 'function') {
  return ret
    .then((res) => { return answer(res) }) // Vulnerable wrapper processing
    .catch(err => { return err })
}
 
// === PATCHED CODE ===
if (ret && typeof ret.then === 'function') {
  // An async validator resolves with the validated data itself,
  // not a { value, error } result envelope. Its properties must
  // not be unwrapped. Treat the async result as pass/fail only.
  return ret
    .then((res) => { return res === false ? validatorFunction.errors : false })
    .catch(err => { return err })
}

In the patched version, the call to answer() is eliminated from the promise resolution chain. The runner now evaluates the resolved promise solely as a indicator of validation success or failure. If res is strictly false, validation is treated as failed and errors are returned. Otherwise, it returns false to indicate that no validation errors occurred, completely bypassing the legacy unwrapping logic.

Exploitation Methodology

To exploit this vulnerability, an attacker must identify a route that utilizes an asynchronous JSON Schema compiler, such as Ajv with asynchronous schemas. The endpoint must also permit additional properties on the input schema, or specifically permit a root-level parameter named value.

The exploit payload is structured with a root-level value property containing arbitrary, unvalidated keys. When submitted, the validator verifies only the top-level keys. Upon validation success, Fastify extracts the contents of value and promotes them to the root of request.body. This mechanism completely evades schema enforcement, allowing the injection of forbidden configuration properties, administrative roles, or restricted identifiers.

Impact Assessment

The impact of this vulnerability is classified as high severity with a CVSS v3.1 score of 8.1. By systematically bypassing JSON schema validation, remote attackers can achieve parameter injection, unauthorized modification of application state, and type confusion in backend databases or business logic.

In typical production applications, schema validation serves as the primary barrier against privilege escalation. For example, if a profile update route forbids the role parameter via schema constraints, an attacker can bypass this restriction by passing { "username": "user", "value": { "role": "admin" } }. This allows the attacker to gain administrative capabilities, modify access controls, or corrupt data integrity.

Furthermore, because the newly substituted request body never undergoes validation, database insertion operations may receive unexpected data structures. This can trigger unexpected application crashes, unhandled database exceptions, or secondary SQL injection and NoSQL injection vulnerabilities in downstream logic.

Remediation & Detection

The primary remediation for this vulnerability is to upgrade Fastify to version 5.12.2 or later, which completely decouples the asynchronous execution path from the legacy synchronous unwrapping logic.

If immediate upgrading is not feasible, developers should enforce additionalProperties: false on all routes employing asynchronous validation. This configuration forces the schema validator to reject any payloads containing the unexpected root-level value property before the validation runner processes the result.

Alternatively, a global preValidation hook can be integrated to detect and drop payloads containing root-level value or error keys on affected routes. This ensures that potentially malicious collision payloads are discarded at the beginning of the request lifecycle.

Official Patches

fastifyFastify Validation Runner Async Result Fix Commit
fastifyFastify Official v5.12.2 Release Notes

Fix Analysis (1)

Technical Appendix

CVSS Score
8.1/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
EPSS Probability
0.43%
Top 65% most exploited

Affected Systems

Fastify applications utilizing asynchronous JSON schema validation prior to version 5.12.2

Affected Versions Detail

Product
Affected Versions
Fixed Version
fastify
fastify
< 5.12.25.12.2
AttributeDetail
CWE IDCWE-20
Attack VectorNetwork
CVSS Score8.1 (High)
Exploit Statuspoc
KEV StatusNot Listed
ImpactValidation Bypass / Parameter Injection

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
CWE-20
Improper Input Validation

The product does not validate or incorrectly validates input that can affect the control flow or data flow of a program.

Vulnerability Timeline

Vulnerability analyzed and fixed in Fastify development branches
2026-09-03
GitHub Security Advisory GHSA-667r-xxjv-c9mm and Fastify v5.12.2 released
2026-09-04
NVD registers and publishes CVE-2026-84504
2026-09-04
NVD completes final technical analysis and categorization
2026-09-15

References & Sources

  • [1]NVD Detailed View
  • [2]CVE.org Official Record
  • [3]GitHub Security Advisory
  • [4]OpenJS Foundation Security Portal

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-128087
3.7

CVE-2026-128087: Premature Key Exchange Callback Invocation Prior to Host Key Verification in russh

CVE-2026-128087 (GHSA-9264-jvgf-6w2f) is an incorrect behavior order (CWE-696) and improper authorization (CWE-863) vulnerability in the russh Rust SSH library, affecting versions 0.55.0 through 0.65.0. During the initial SSH key exchange (KEX) handshake, the client state machine invokes the client::Handler::kex_done() callback—providing the negotiated raw shared secret bytes—prior to validating the remote server's host key or certificate via check_server_key(). Consequently, an untrusted or rogue SSH server can complete cryptographic key agreement and force a connecting client to execute side-effecting application logic inside kex_done() before the server's identity is checked and rejected.

Amit Schendel
Amit Schendel
6 views•10 min read
•1 day ago•CVE-2026-128082
7.5

CVE-2026-128082: Uncontrolled Recursion and Denial of Service in AutoMapper via Constructor Parameter Mapping

CVE-2026-128082 (GHSA-6vhm-j9h7-f9gh) is an uncontrolled recursion vulnerability (CWE-674) in AutoMapper, a convention-based object-object mapper for .NET. When mapping nested or self-referential types into destination models that rely on parameterized constructors, C# positional records, or recursive ConstructUsing expressions, AutoMapper evaluates child constructor arguments prior to incrementing the parent's recursion depth counter. This ordering flaw bypasses both explicit MaxDepth limits and the default depth limit of 64. An unauthenticated remote attacker can supply deeply nested input payloads to affected endpoints, exhausting the thread call stack and triggering an uncatchable System.StackOverflowException that terminates the hosting .NET process.

Amit Schendel
Amit Schendel
7 views•11 min read
•1 day ago•CVE-2026-128080
5.8

CVE-2026-128080: Sensitive Query Parameter Disclosure on Incoming Server Spans in OpenTelemetry JavaScript (@opentelemetry/instrumentation-http)

An information exposure vulnerability in the @opentelemetry/instrumentation-http package for OpenTelemetry JavaScript versions 0.204.0 prior to 0.222.0 causes incoming HTTP server spans to record raw, unredacted query string parameters under the url.query attribute. While outgoing client spans applied built-in and user-configured query parameter redaction, incoming server spans bypassed this sanitization completely, resulting in the transmission of sensitive credentials such as pre-signed cloud URLs and API tokens to external observability backends.

Alon Barad
Alon Barad
7 views•10 min read
•1 day ago•CVE-2026-128089
7.5

CVE-2026-128089: Uncontrolled Resource Consumption in dnspython WKS Record Parser

CVE-2026-128089 is an uncontrolled resource consumption vulnerability in the dnspython toolkit for Python, affecting all versions prior to 2.9.2. When parsing Well-Known Service (WKS) records from text via dns.rdtypes.IN.WKS.WKS.from_text(), the parser fails to validate that numeric service port identifiers fall within the RFC 1035 valid range of 0 through 65535. An attacker capable of supplying untrusted zone files or RDATA text strings containing an arbitrarily large service port integer can force the parser to allocate an unbounded bitmap array using an inefficient linear append loop, resulting in severe CPU exhaustion, application hangs, or Out-Of-Memory (OOM) process termination.

Amit Schendel
Amit Schendel
7 views•10 min read
•1 day ago•CVE-2026-126347
3.1

CVE-2026-126347: Open Redirect via Triple-Slash Redirect Paths in Tornado RedirectHandler

CVE-2026-126347 (GHSA-5cjw-f85j-cv6r) is an open redirect vulnerability (CWE-601) in Tornado, an asynchronous Python networking library and web framework. The flaw resides in tornado.web.RedirectHandler when dynamic URL redirection templates incorporate unvalidated user input. Due to a parser differential between RFC 3986 (used by Python's urllib.parse.urlsplit) and the WHATWG URL Standard (used by modern web browsers), inputs containing three or more leading slashes bypass Tornado 6.6.0's validation logic, allowing unauthenticated attackers to redirect users to arbitrary external domains.

Alon Barad
Alon Barad
8 views•11 min read
•1 day ago•CVE-2026-128123
5.9

CVE-2026-128123: Uncaught Exception and Denial of Service in SvelteKit @sveltejs/adapter-node

A Denial of Service (DoS) vulnerability exists in @sveltejs/adapter-node versions 5.5.7 and 6.0.0-next.0 through 6.0.0. When a SvelteKit server route returns a direct response from a fetch() call with a Content-Type of text/event-stream, the Node.js adapter attempts to mutate the response headers to disable proxy buffering. Because headers returned directly by the WHATWG Fetch API carry an immutable guard, this mutation throws an unhandled TypeError, terminating the underlying Node.js process and denying service to all active and subsequent clients.

Alon Barad
Alon Barad
7 views•9 min read