{"id":"CVE-2022-41919","published":"2022-11-22T00:00:00Z","modified":"2025-04-23T16:36:24Z","title":"Fastify vulnerable to Cross-Site Request Forgery (CSRF) attack via incorrect content type","vendor":"fastify","product":"fastify","tier":"tail","description":{"text":"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'.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.2,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00491,"percentile":0.4314,"provenance":"source"},"cwes":[{"id":"CWE-352","name":"Cross-Site Request Forgery"}],"references":[{"url":"https://github.com/fastify/fastify/security/advisories/GHSA-3fjj-p79j-c9hh","tags":[]},{"url":"https://github.com/fastify/fastify/commit/62dde76f1f7aca76e38625fe8d983761f26e6fc9","tags":[]},{"url":"https://www.npmjs.com/package/%40fastify/csrf","tags":[]}],"priority":{"score":11.6,"factors":[{"name":"EPSS percentile","points":8.63},{"name":"CVSS severity","points":2.94}]},"vendorSlug":"fastify","affectedVersions":[{"vendor":"fastify","product":"fastify","versions":[">= 4.0.0, < 4.10.2",">= 3.0.0, < 3.29.4"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-23T13:54:07.870257Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"fastify","vulnerableRanges":[">=4.0.0, <4.10.2",">=3.0.0, <3.29.4"],"patched":["4.10.2","3.29.4"],"from":["GHSA-3fjj-p79j-c9hh"],"provenance":"source"}],"euvd":{"id":"EUVD-2022-7208","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-fastify-cve-2022-39288","parents":[{"from":"CVE-2022-39288","to":"CVE-2022-41919","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:fastify","fromFixed":"4.8.1","toFixed":"4.10.2","daysApart":43},{"kind":"same-code","provenance":"machine","files":["lib/contentTypeParser.js"],"commits":["https://github.com/fastify/fastify/commit/fbb07e8dfad74c69cd4cd2211aedab87194618e3","https://github.com/fastify/fastify/commit/62dde76f1f7aca76e38625fe8d983761f26e6fc9"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2018-3711","published":"2018-06-07","fixed":"0.38.0","kev":false},{"cve":"CVE-2020-8192","published":"2020-07-30","fixed":"2.15.1","kev":false},{"cve":"CVE-2022-39288","published":"2022-10-10","fixed":"4.8.1","kev":false},{"cve":"CVE-2022-41919","published":"2022-11-22","fixed":"4.10.2","kev":false},{"cve":"CVE-2025-32442","published":"2025-04-18","fixed":"5.3.2","kev":false},{"cve":"CVE-2026-25223","published":"2026-02-03","fixed":"5.7.2","kev":false},{"cve":"CVE-2026-25224","published":"2026-02-03","fixed":"5.7.3","kev":false}],"package":"npm:fastify"}}