ADVISORIES

GitHub Advisory Database

GHSA-49wp-qq6x-g2rf

Cross-site Request Forgery in fastify-csrf

Details

The package fastify-csrf before 3.0.0 has a set of issues that affect its ability to do CSRF protection.

  • The generated cookie used insecure defaults, and did not have the httpOnly flag on: cookieOpts: { path: '/', sameSite: true }
  • The CSRF token was available in the GET query parameter

Affected packages

EcosystemPackageAffected versions
npmfastify-csrf
All versions before 3.0.0 (fixed in 3.0.0)

References