{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-41919","id":"CVE-2022-41919","title":"Fastify vulnerable to Cross-Site Request Forgery (CSRF) attack via incorrect content type","description":"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 by","descriptionLong":"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":"2022-11-22T00:00:00.000Z","updated":"2026-10-28T02:30:31.260930405Z","reserved":"2022-09-30T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":4.2,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","rating":"medium","source":"GitHub"}],"rating":"medium","products":["fastify"],"affectedProducts":[{"vendor":"fastify","product":"fastify","defaultStatus":null,"versions":[{"version":">= 4.0.0, < 4.10.2","status":"affected"},{"version":">= 3.0.0, < 3.29.4","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"fastify","purl":"pkg:npm/fastify","ranges":[">=4.0.0 <4.10.2",">=3.0.0 <3.29.4"],"fixed":["4.10.2","3.29.4"],"advisory":"GHSA-3fjj-p79j-c9hh"}],"cwes":["CWE-352"],"aliases":["GHSA-3fjj-p79j-c9hh"],"references":[{"url":"https://github.com/fastify/fastify/security/advisories/GHSA-3fjj-p79j-c9hh","tags":["x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/fastify/fastify/commit/62dde76f1f7aca76e38625fe8d983761f26e6fc9","tags":["x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://www.npmjs.com/package/%40fastify/csrf","tags":["x_transferred","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/41xxx/CVE-2022-41919.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-41919","tags":["advisory"]},{"url":"https://github.com/fastify/fastify","tags":["package"]},{"url":"https://www.npmjs.com/package/@fastify/csrf","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00491,"epssPercentile":0.42997,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-41919","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-41919","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-41919","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-3fjj-p79j-c9hh","ok":true,"note":"GHSA-3fjj-p79j-c9hh"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-41919","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}