{"id":"CVE-2022-41919","summary":"Fastify vulnerable to Cross-Site Request Forgery (CSRF) attack via incorrect content type","details":"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'.","aliases":["GHSA-3fjj-p79j-c9hh"],"modified":"2026-08-12T03:51:23.191285263Z","published":"2022-11-22T00:00:00Z","database_specific":{"cwe_ids":["CWE-352"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/41xxx/CVE-2022-41919.json","cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://www.npmjs.com/package/%40fastify/csrf"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/41xxx/CVE-2022-41919.json"},{"type":"ADVISORY","url":"https://github.com/fastify/fastify/security/advisories/GHSA-3fjj-p79j-c9hh"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-41919"},{"type":"FIX","url":"https://github.com/fastify/fastify/commit/62dde76f1f7aca76e38625fe8d983761f26e6fc9"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/fastify/fastify","events":[{"introduced":"d2d533494b143a2c944c491c56960f1107f96733"},{"fixed":"605303133ee853b9b293d545f210910473ea4553"},{"introduced":"e941c24bf51af7184cf658ca138e069e8c166ef8"},{"fixed":"311590c147af90e32f7bcbcc10e0d176cbbafaca"},{"fixed":"62dde76f1f7aca76e38625fe8d983761f26e6fc9"}],"database_specific":{"source":["CPE_RANGE","REFERENCES"],"cpe":"cpe:2.3:a:fastify:fastify:*:*:*:*:*:node.js:*:*","extracted_events":[{"introduced":"3.0.0"},{"fixed":"3.29.4"},{"introduced":"4.0.0"},{"fixed":"4.10.2"}]}}],"versions":["v3.29.3","v4.10.1","v4.10.0","v4.9.2","v4.9.1","v4.9.0","v4.8.1","v3.29.2","v4.8.0","v4.7.0","v4.6.0","v4.5.3","v4.5.2","v4.5.1","v4.5.0","v4.4.0","v4.3.0","v4.2.1","v4.2.0","v4.1.0","v4.0.3","v4.0.2","v4.0.1","v4.0.0","v3.29.0","v3.28.0","v3.27.4","v3.27.3","v3.27.2","v3.27.1","v3.27.0","v3.26.0","v3.25.3","v3.25.2","v3.25.1","v3.25.0","v3.24.1","v3.24.0","v3.23.1","v3.23.0","v3.22.1","v3.22.0","v3.21.6","v3.21.5","v3.21.4","v3.21.3","v3.21.2","v3.21.1","v3.21.0","v3.20.2","v3.20.1","v3.20.0","v3.19.2","v3.19.1","v3.19.0","v3.18.1","v3.18.0","v3.17.0","v3.16.2","v3.16.1","v3.16.0","v3.15.1","v3.15.0","v3.14.2","v3.14.1","v3.14.0","v3.13.0","v3.12.0","v3.11.0","v3.10.1","v3.10.0","v3.9.2","v3.9.1","v3.9.0","v3.8.0","v3.7.0","v3.6.0","v3.5.1","v3.5.0","v3.4.1","v3.4.0","v3.3.0","v3.2.1","v3.2.0","v3.1.1","v3.1.0","v3.0.3","v3.0.2","v3.0.1","v3.0.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-41919.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N"}]}