CVE-2022-41919
published medium CVSS 3.1 · 4.2Fastify vulnerable to Cross-Site Request Forgery (CSRF) attack via incorrect content type
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| fastify | — | fastify>= 4.0.0, < 4.10.2 · >= 3.0.0, < 3.29.4 | Affected | Not stated | 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'.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 4.2 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| fastify | fastify | >= 4.0.0, < 4.10.2 (affected)>= 3.0.0, < 3.29.4 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-352 CWE-352: Cross-Site Request Forgery (CSRF)
References
3Provider assertions
3GitHub_M · cna
Fastify vulnerable to Cross-Site Request Forgery (CSRF) attack via incorrect content type
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- d986ad54dd026bb7b798e717e344c96db8435677ad78f0f2ba327675d1590dd1
- Ingested
- 23 Sep 2026, 08:02:45 UTC
- Source record
- Official CVE record