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

- Severity: Medium 4.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.49%, higher than 43% of CVEs (2026-12-01)
- Published: 2022-11-21T22:28:11.000Z
- Modified: 2026-06-17T05:04:03.767Z
- Also known as: GHSA-3fjj-p79j-c9hh
- Weaknesses: CWE-352
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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

(As written by CVE List.)

## Affected

- fastify fastify: >= 4.0.0, < 4.10.2; >= 3.0.0, < 3.29.4; from 3.0.0 before 3.29.4; from 4.0.0 before 4.10.2
- fastify (npm): from 4.0.0 before 4.10.2; from 3.0.0 before 3.29.4

## Every score

- GitHub_M: CVSS:3.1 4.2 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N`
- GitHub: CVSS:3.1 4.2 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

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

## Sources

- CVE List: [CVE-2022-41919](https://www.cve.org/CVERecord?id=CVE-2022-41919), CVE Terms of Use, modified 2025-04-23
- GitHub Advisory Database: [GHSA-3fjj-p79j-c9hh](https://github.com/advisories/GHSA-3fjj-p79j-c9hh), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2022-41919](https://nvd.nist.gov/vuln/detail/CVE-2022-41919), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-41919 · Whole record: https://cve.day/CVE-2022-41919.json · Rebuilt by cve.day 2026-11-25T22:58:16.825Z
