CVE-2026-25223: Fastify's Content-Type header tab character allows body validation bypass
A validation bypass vulnerability exists in Fastify where request body validation schemas specified by Content-Type can be completely circumvented. By appending a tab character (\t) followed by arbitrary content to the Content-Type header, attackers can bypass body validation while the server still processes the body as the original content type.
For example, a request with Content-Type: application/json\ta will bypass JSON schema validation but still be parsed as JSON.
This vulnerability affects all Fastify users who rely on Content-Type-based body validation schemas to enforce data integrity or security constraints. The concrete impact depends on the handler implementation and the level of trust placed in the validated request body, but at the library level, this allows complete bypass of body validation for any handler using Content-Type-discriminated schemas.
This issue is a regression or missed edge case from the fix for a previously reported vulnerability.
References
- fastify.dev/docs/latest/Reference/Validation-and-Serialization
- github.com/advisories/GHSA-jx2c-rxcm-jvmq
- github.com/fastify/fastify
- github.com/fastify/fastify/blob/759e9787b5669abf953068e42a17bffba7521348/lib/content-type-parser.js
- github.com/fastify/fastify/blob/759e9787b5669abf953068e42a17bffba7521348/lib/validation.js
- github.com/fastify/fastify/commit/32d7b6add39ddf082d92579a58bea7018c5ac821
- github.com/fastify/fastify/security/advisories/GHSA-jx2c-rxcm-jvmq
- hackerone.com/reports/3464114
- nvd.nist.gov/vuln/detail/CVE-2026-25223
Code Behaviors & Features
Detect and mitigate CVE-2026-25223 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →