# CVE-2022-41919: Fastify vulnerable to Cross-Site Request Forgery (CSRF) attack via incorrect content type

- Priority: **Routine**
- Reason: Not severe (CVSS 4.2, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2022-11-22 · Modified: 2025-04-23
- Aliases: GHSA-3fjj-p79j-c9hh
- Record: https://cvemate.com/vulnerability/CVE-2022-41919 · JSON: https://cvemate.com/vulnerability/CVE-2022-41919/json

## Description

```text
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'.
```

## Signals

- CVSS: 8.8 high (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 0.491%, percentile 43.841%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- fastify fastify: ≥ 3.0.0, \< 3.29.4 \| ≥ 4.0.0, \< 4.10.2
- Npm fastify (Npm): ≥ 4.0.0, \< 4.10.2 \| ≥ 3.0.0, \< 3.29.4

## References

- <https://github.com/fastify/fastify/security/advisories/GHSA-3fjj-p79j-c9hh>
- <https://github.com/fastify/fastify/commit/62dde76f1f7aca76e38625fe8d983761f26e6fc9>
- <https://www.npmjs.com/package/%40fastify/csrf>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-41919>
- <https://github.com/fastify/fastify>
- <https://www.npmjs.com/package/@fastify/csrf>

---

Data as of 2026-12-05T09:21:48.202Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
