CVE-2022-41919
HIGH 8.8CVSS 3.1Fastify: Incorrect Content-Type parsing can lead to CSRF attack
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'.
- Published
- 22 Nov 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-352
- Also known as
- GHSA-3fjj-p79j-c9hh
- Sources
- NVDJSONOSV GHSA-3fjj-p79j-c9hhJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 4.2 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 4.2 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | fastify | fastifycpe:2.3:a:fastify:fastify:*:*:*:*:*:node.js:*:* |
>= 3.0.0, < 3.29.4 | 3.29.4 |
| NVD | fastify | fastifycpe:2.3:a:fastify:fastify:*:*:*:*:*:node.js:*:* |
>= 4.0.0, < 4.10.2 | 4.10.2 |
| OSV | npm | fastify | >= 4.0.0, < 4.10.2 | 4.10.2 |
| OSV | npm | fastify | >= 3.0.0, < 3.29.4 | 3.29.4 |
References
- https://github.com/fastify/fastify/commit/62dde76f1f7aca76e38625fe8d983761f26e6fc9 · Patch, Third Party Advisory, WEB
- https://github.com/fastify/fastify/security/advisories/GHSA-3fjj-p79j-c9hh · 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
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 22 Nov 2022)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 21 Nov 2022)