# CVE-2026-33806: Fastify vulnerable to invalid content-type parsing, which could lead to validation bypass

Source: https://junglewise.ai/threats/cve-2025-32442-fastify-body-schema-validation-bypass-via-leading-space-in  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-04-18. Updated: 2026-09-24  
License: CC BY 4.0 with a link back

CVE-2026-33806 · Severity: low · CVSS 3.1 · Published 2025-04-18

Fastify is a popular Node.js web framework used to build REST APIs and web applications. This vulnerability allows attackers to bypass request body validation by adding a single space character to the Content-Type header, enabling them to submit malformed or malicious data that should have been rejected. This could lead to data corruption, unauthorized state changes, or exploitation of downstream business logic that expects validated inputs.

Technologies: [fastify (npm)](https://junglewise.ai/threats/technologies/fastify). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-33806 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-33806 being exploited in the wild.

**How severe is CVE-2026-33806?** Low severity, with a CVSS score of 3.1, published 18 April 2025.

**Which products and versions are affected?** fastify (npm) SEMVER:introduced=5.0.0,fixed=5.3.2, SEMVER:introduced=5.3.2,fixed=5.8.5.

**Is there a fix for CVE-2026-33806?** Yes. fastify (npm): upgrade to 5.3.2, 5.8.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-33806 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-33806?** Check whether you run fastify (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- fastify (npm): upgrade to 5.3.2, 5.8.5 or later

  ```sh
  npm install fastify@5.8.5
  ```


## Technical details

The vulnerability is a parser-validator differential in Fastify's Content-Type handling. The parser (lib/content-type.js) applies trimStart() before processing the header and correctly parses the body as JSON. However, the validator (lib/validation.js) splits on the regex /[ ;]/ before trimming, causing a leading space to become a split point that produces an empty string. The validator then looks up a schema for content-type "" (empty string), finds nothing, and skips validation entirely. This is a regression introduced by commit f3d2bcb which changed the split delimiter from ';' to /[ ;]/ to fix CVE-2025-32442. The old code applied trim() after splitting, preventing this attack. Exploitation requires only network access, no authentication or user interaction, and consists of modifying a single HTTP header. The fix is to add trimStart() before the split operation in getEssenceMediaType().

## Affected products

- OpenJS Foundation Fastify 5.3.2 through 5.8.4

## Identifiers

- CVE-2026-33806
- CVE-2025-32442
- GHSA-247c-9743-5963
- GHSA-mg2h-6x62-wpwc

## Timeline

- 2026-04-15: disclosed: Advisory published on GitHub and OSV
- 2026-04-15: patched: Fixed in version 5.8.5
- 2025-04-18: other: Regression introduced by commit f3d2bcb attempting to fix CVE-2025-32442

## References

- [https://github.com/fastify/fastify/security/advisories/GHSA-247c-9743-5963](https://github.com/fastify/fastify/security/advisories/GHSA-247c-9743-5963)
- [https://github.com/fastify/fastify/security/advisories/GHSA-mg2h-6x62-wpwc](https://github.com/fastify/fastify/security/advisories/GHSA-mg2h-6x62-wpwc)
- [https://github.com/fastify/fastify/commit/f3d2bcb3963cd570a582e5d39aab01a9ae692fe4](https://github.com/fastify/fastify/commit/f3d2bcb3963cd570a582e5d39aab01a9ae692fe4)
- [https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
- [https://github.com/fastify/fastify](https://github.com/fastify/fastify)

## Related threats

- [fastify is vulnerable to header validation bypass via case-sensitive propertyNames](https://junglewise.ai/threats/cve-2026-107832-fastify-is-a-fast-and-low-overhead-web-framework-for-node-js-in)
- [Fastify denial of service via unhandled exception on HTTP/2 trailer responses](https://junglewise.ai/threats/cve-2026-92081-fastify-denial-of-service-via-unhandled-exception-on-http-2)
- [Fastify header validation bypass via incomplete schema case normalization](https://junglewise.ai/threats/cve-2026-84428-fastify-header-validation-bypass-via-incomplete-schema-case)
- [Fastify request body replacement via async validation result collision](https://junglewise.ai/threats/cve-2026-84504-fastify-request-body-replacement-via-async-validation-result)
- [Fastify request validation bypass via skipped boolean false schemas](https://junglewise.ai/threats/cve-2026-84469-fastify-request-validation-bypass-via-skipped-boolean-false)
