Fastify: Incorrect Content-Type parsing can lead to CSRF attack
Impact
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.
Patches
For 4.x users, please update to at least 4.10.2
For 3.x users, please update to at least 3.29.4
Workarounds
Implement Cross-Site Request Forgery protection using @fastify/csrf.
References
Check out the HackerOne report: https://hackerone.com/reports/1763832.
For more information
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| npm-Paket | fastify | >= 4.0.0, < 4.10.2, >= 3.0.0, < 3.29.4 | 4.10.2, 3.29.4 |
Verweise
- CVSS-Vektor
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N- Schwäche (CWE)
CWE-352- Plattform
- npm
- Paket
fastify- Veröffentlicht
- 21.11.2022
- Aktualisiert
- 11.10.2026 10:22
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-3fjj-p79j-c9hh - CC BY 4.0
Schwachstellenhistorie: fastify
Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 16
- Erste → letzte
- 07.2018 09.2026
- Ohne Fix
- 0
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Hoch 8
- Mittel 7
- Niedrig 1
Veröffentlichungen pro Jahr
- 2018: 1
- 2019: 0
- 2020: 1
- 2021: 0
- 2022: 2
- 2023: 0
- 2024: 0
- 2025: 1
- 2026: 11
-
Fastify: Incorrect Content-Type parsing can lead to CSRF attack dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.