CVE-2022-41919
What it is
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'.
At a glance
- Exploitability
- Can be exploited over the network without logging in, but needs a user to act. Limited direct impact.
- Exploit odds
- 0.4% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 0.4% in the next 30 days (EPSS).
- Severity: 4.2 MEDIUM (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 0.4% · EPSS, next 30 days
- Weakness
- CWE-352 · Cross-site request forgery
- Record status
- Modified
Affected
- Fastify < 3.29.4
- Fastify < 4.10.2
Attack profile CVSS 3.1 · 4.2
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Raw vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2022-41919.md and follow it. Check whether this project is affected by CVE-2022-41919. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/fastify/fastify/commit/62dde76f1f7aca76e38625fe8d983761f26e6fc9
- https://github.com/fastify/fastify/security/advisories/GHSA-3fjj-p79j-c9hh
- https://github.com/fastify/fastify/commit/62dde76f1f7aca76e38625fe8d983761f26e6fc9
- https://github.com/fastify/fastify/security/advisories/GHSA-3fjj-p79j-c9hh
References
- https://github.com/fastify/fastify/commit/62dde76f1f7aca76e38625fe8d983761f26e6fc9
- https://github.com/fastify/fastify/security/advisories/GHSA-3fjj-p79j-c9hh
- https://www.npmjs.com/package/%40fastify/csrf
- https://github.com/fastify/fastify/commit/62dde76f1f7aca76e38625fe8d983761f26e6fc9
- https://github.com/fastify/fastify/security/advisories/GHSA-3fjj-p79j-c9hh
- https://www.npmjs.com/package/%40fastify/csrf