Cross-site Request Forgery in fastify-csrf
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 software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | fastify-csrf | < 3.0.0 | 3.0.0 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2020-28482
- https://github.com/fastify/fastify-csrf/pull/26
- https://github.com/fastify/fastify-csrf/commit/3c9de36e9e73ce0eda9207f84f2ac0243e1f5253
- https://github.com/fastify/fastify-csrf
- https://snyk.io/vuln/SNYK-JS-FASTIFYCSRF-1062044
- https://www.npmjs.com/package/fastify-csrf
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-352- Platform
- npm
- Package
fastify-csrf- Disclosed
- 20.01.2021
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-49wp-qq6x-g2rf - CC BY 4.0
Vulnerability history: fastify-csrf
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 2
- First → latest
- 01.2021 05.2021
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 1
- Medium 1
Disclosures per year
- 2021: 2
- 2022: 0
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 0
-
Cross-site Request Forgery in fastify-csrf this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.