Fastify vulnerable to invalid content-type parsing, which could lead to validation bypass
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
Fastify is a fast and low overhead web framework, for Node.js. In versions 5.0.0 to 5.3.0 as well as version 4.29.0, applications that specify different validation strategies for different content types have a possibility to bypass validation by providing a _slightly altered_ content type such as with different casing or altered whitespacing before `;`. This was patched in v5.3.1, but the initial patch did not cover all problems. This has been fully patched in v5.3.2 and v4.29.1. A workaround involves not specifying individual content types in the schema.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| fastify | fastify | 5.0.0 to before 5.3.2; = 4.29.0 | 5.3.2 | Patch available | CNA |
| — | fastify (npm) | 5.0.0 to before 5.3.2 | 5.3.2 | Patch available | GHSA-mg2h-6x62-wpwc |
| — | fastify (npm) | 4.29.0 to before 4.29.1 | 4.29.1 | Patch available | GHSA-mg2h-6x62-wpwc |
- fastify Vendorfastify Affected 5.0.0 to before 5.3.2; = 4.29.0 Fixed in 5.3.2 Patch available CNA
- fastify (npm) Vendor— Affected 5.0.0 to before 5.3.2 Fixed in 5.3.2 Patch available GHSA-mg2h-6x62-wpwc
- fastify (npm) Vendor— Affected 4.29.0 to before 4.29.1 Fixed in 4.29.1 Patch available GHSA-mg2h-6x62-wpwc
Remediation
- Fix · CNA fastify (fastify) Fixed in 5.3.2
- Fix · GHSA-mg2h-6x62-wpwc fastify (npm) Fixed in 5.3.2 Advisory →
- Fix · GHSA-mg2h-6x62-wpwc fastify (npm) Fixed in 4.29.1 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
Not affected: 2 products
- OpenShift Serverless
- Red Hat OpenShift AI (RHOAI)
Timeline
- 2026-10-02 Threatist record created from CVE-2025-32442
- 2026-10-03 Alias added: GHSA-mg2h-6x62-wpwc
References
Patch 2
More Fastify vulnerabilities
- TI-2022-18664 Denial of service in Fastify via Content-Type header CVSS 3.1HIGH 7.5
- TI-2026-58050 fastify vulnerable to request validation bypass via skipped boolean false schemas CVSS 3.1HIGH 7.5
- TI-2026-58022 fastify vulnerable to header validation bypass via incomplete schema case normalization CVSS 3.1HIGH 7.5
- TI-2026-53284 fastify vulnerable to authentication bypass via malformed URLs reaching encapsulated not-found handlers CVSS 3.1HIGH 7.5
- TI-2026-26178 fastify vulnerable to Body Schema Validation Bypass via Leading Space in Content-Type Header CVSS 3.1HIGH 7.5
- TI-2026-58072 fastify vulnerable to request body replacement via an async validation result collision CVSS 3.1HIGH 8.1
Sources
- CVE-2025-32442 · CVE Program
- CVE-2025-32442 · NVD
- FIRST EPSS
- GHSA-mg2h-6x62-wpwc · GitHub Advisory Database · CC BY 4.0
- CVE-2025-32442 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences