CVE-2026-18504
fastify vulnerable to schema validation bypass via root primitive coercion mismatch
Description
fastify is a fast and low overhead web framework for Node.js. Versions of fastify before 5.12.1 are affected by a schema validation bypass when a request body schema targets a root primitive value. When the schema validates a top-level primitive such as an integer, Ajv can coerce a JSON string into the expected type during validation, but Fastify does not replace the root request body with the coerced value, so the route handler receives the original unvalidated string. As a result, a request that should have failed validation can reach application logic with a value that does not satisfy the schema, which can undermine integrity and access-control checks that rely on the validated type. Users should upgrade to fastify 5.12.1, which fixes the mismatch. No known workarounds are available.
INFO
Published Date :
Aug. 18, 2026, 9:16 p.m.
Last Modified :
Aug. 19, 2026, 2:17 p.m.
Remotely Exploit :
No
Source :
ce714d77-add3-4f53-aff5-83d477b104bb
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | MEDIUM | ce714d77-add3-4f53-aff5-83d477b104bb | ||||
| CVSS 3.1 | MEDIUM | MITRE-CVE |
Solution
- Upgrade fastify to version 5.12.1.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-18504.
| URL | Resource |
|---|---|
| https://cna.openjsf.org/security-advisories.html | |
| https://github.com/fastify/fastify/security/advisories/GHSA-w2qp-rph6-63g4 |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-18504 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-18504
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-18504 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-18504 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Aug. 19, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-18504', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-08-19T13:14:53.749588Z'} -
New CVE Received by ce714d77-add3-4f53-aff5-83d477b104bb
Aug. 18, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'fastify', 'product': 'fastify', 'versions': [{'status': 'affected', 'version': '0', 'lessThan': '5.12.1', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '5.12.1', 'versionType': 'semver'}], 'packageURL': 'pkg:npm/fastify', 'defaultStatus': 'unaffected'}] Added Description fastify is a fast and low overhead web framework for Node.js. Versions of fastify before 5.12.1 are affected by a schema validation bypass when a request body schema targets a root primitive value. When the schema validates a top-level primitive such as an integer, Ajv can coerce a JSON string into the expected type during validation, but Fastify does not replace the root request body with the coerced value, so the route handler receives the original unvalidated string. As a result, a request that should have failed validation can reach application logic with a value that does not satisfy the schema, which can undermine integrity and access-control checks that rely on the validated type. Users should upgrade to fastify 5.12.1, which fixes the mismatch. No known workarounds are available. Added CVSS V3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N Added CWE CWE-20 Added Reference https://cna.openjsf.org/security-advisories.html Added Reference https://github.com/fastify/fastify/security/advisories/GHSA-w2qp-rph6-63g4