Loading advisory.
Loading advisory.
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.
Published 2026-02-02 22:23 UTC · Modified 2026-09-16 12:04 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| fastify | npm | < 5.7.2 | 5.7.2 | npm install fastify@5.7.2 |
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.
This vulnerability has been patched in Fastify v5.7.2. All users should upgrade to this version or later immediately.
If upgrading is not immediately possible, user can implement a custom onRequest hook to reject requests containing tab characters in the Content-Type header:
fastify.addHook('onRequest', async (request, reply) => {
const contentType = request.headers['content-type']
if (contentType && contentType.includes('\t')) {
reply.code(400).send({ error: 'Invalid Content-Type header' })
}
})https://github.com/fastify/fastify/blob/759e9787b5669abf953068e42a17bffba7521348/lib/validation.js#L272
https://github.com/fastify/fastify/blob/759e9787b5669abf953068e42a17bffba7521348/lib/content-type-parser.js#L125
https://hackerone.com/reports/3464114
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.009 on 2026-11-24 to 0.013 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.009 | first score | v2026.06.15 |
| 2026-11-26 | 0.013 | 0.009 | v2026.06.15 |