CVE-2022-41919Fastify
High 8.8 No auth needed
Follow: this CVE · Fastify · Fastify We alert you by email or Slack (account required).
- Priority
- 68
- CVSS 3.1
- 8.8
- EPSS
- 0.5% probability of exploitation in 30 days · percentile 37
- Auth required
- No
- Published
- Nov 22, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-352
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
What happens
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'.
What to do
- Apply the vendor's security update for Fastify.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | fastify |
≥ 4.0.0 < 4.10.2 |
4.10.2 |
npm install fastify@4.10.2 |
| npm | fastify |
≥ 3.0.0 < 3.29.4 |
3.29.4 |
npm install fastify@3.29.4 |
Per OSV / GitHub Advisories (GHSA-3fjj-p79j-c9hh). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| fastify | fastify | ≥ 3.0.0 < 3.29.4 |
| fastify | fastify | ≥ 4.0.0 < 4.10.2 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Third Party Advisory
- www.npmjs.com