Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. fastify
  4. ›
  5. CVE-2022-41919

CVE-2022-41919: Cross-Site Request Forgery (CSRF)

November 22, 2022 (updated November 7, 2023)

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'.

References

  • github.com/advisories/GHSA-3fjj-p79j-c9hh
  • github.com/fastify/fastify/commit/62dde76f1f7aca76e38625fe8d983761f26e6fc9
  • github.com/fastify/fastify/security/advisories/GHSA-3fjj-p79j-c9hh
  • nvd.nist.gov/vuln/detail/CVE-2022-41919
  • www.npmjs.com/package/@fastify/csrf

Code Behaviors & Features

Detect and mitigate CVE-2022-41919 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 3.0.0 before 3.29.4, all versions starting from 4.0.0 before 4.10.2

Fixed versions

  • 3.29.4
  • 4.10.2

Solution

Upgrade to versions 3.29.4, 4.10.2 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-352: Cross-Site Request Forgery (CSRF)

Source file

npm/fastify/CVE-2022-41919.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:09 +0000.