fastify-csrf@1.0.3 vulnerabilities

A plugin for adding CSRF protection to Fastify.

Direct Vulnerabilities

Known vulnerabilities in the fastify-csrf package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • M
Cross-site Request Forgery (CSRF)

fastify-csrf is an A plugin for adding CSRF protection to Fastify.

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF). It does not provide adequate protection against cookie tossing attacks.

How to fix Cross-site Request Forgery (CSRF)?

Upgrade fastify-csrf to version 3.1.0 or higher.

<3.1.0
  • M
Cross-site Request Forgery (CSRF)

fastify-csrf is an A plugin for adding CSRF protection to Fastify.

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF). The generated cookie used insecure defaults, and did not have the httpOnly flag on: cookieOpts: { path: '/', sameSite: true }. Also, the CSRF token was available in the GET query parameter

How to fix Cross-site Request Forgery (CSRF)?

Upgrade fastify-csrf to version 3.0.0 or higher.

<3.0.0