Fastify vulnerable to Cross-Site Request Forgery (CSRF) attack via incorrect content type
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Tampering
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 1 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-352.
Summary
Fastify is a web framework with minimal overhead and plugin architecture. The attacker can use the incorrect `Content-Type` to bypass the `Pre-Flight` checking of `fetch`. `fetch()` requests with Content-Type’s essence as "application/x-www-form-urlencoded", "multipart/form-data", or "text/plain", could potentially be used to invoke routes that only accepts `application/json` content type, thus bypassing any CORS protection, and therefore they could lead to a Cross-Site Request Forgery attack. This issue has been patched in version 4.10.2 and 3.29.4. As a workaround, implement Cross-Site Request Forgery protection using `@fastify/csrf'.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- 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 | 4.0.0 to before 4.10.2; 3.0.0 to before 3.29.4 | 4.10.2, 3.29.4 | Patch available | CNA |
| — | fastify (npm) | 4.0.0 to before 4.10.2 | 4.10.2 | Patch available | GHSA-3fjj-p79j-c9hh |
| — | fastify (npm) | 3.0.0 to before 3.29.4 | 3.29.4 | Patch available | GHSA-3fjj-p79j-c9hh |
- fastify Vendorfastify Affected 4.0.0 to before 4.10.2; 3.0.0 to before 3.29.4 Fixed in 4.10.2, 3.29.4 Patch available CNA
- fastify (npm) Vendor— Affected 4.0.0 to before 4.10.2 Fixed in 4.10.2 Patch available GHSA-3fjj-p79j-c9hh
- fastify (npm) Vendor— Affected 3.0.0 to before 3.29.4 Fixed in 3.29.4 Patch available GHSA-3fjj-p79j-c9hh
Remediation
- Fix · CNA fastify (fastify) Fixed in 4.10.2, 3.29.4
- Fix · GHSA-3fjj-p79j-c9hh fastify (npm) Fixed in 4.10.2 Advisory →
- Fix · GHSA-3fjj-p79j-c9hh fastify (npm) Fixed in 3.29.4 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat OpenShift Dev Spaces | Affected | No fix yet |
Timeline
- 2026-10-02 Threatist record created from CVE-2022-41919
- 2026-10-03 Alias added: GHSA-3fjj-p79j-c9hh
References
Advisory 2
More Fastify vulnerabilities
- TI-2022-18664 Denial of service in Fastify via Content-Type header CVSS 3.1HIGH 7.5
- TI-2025-23513 Fastify vulnerable to invalid content-type parsing, which could lead to validation bypass 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
Sources
- CVE-2022-41919 · CVE Program
- CVE-2022-41919 · NVD
- FIRST EPSS
- GHSA-3fjj-p79j-c9hh · GitHub Advisory Database · CC BY 4.0
- CVE-2022-41919 · 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