CVE-2021-29624
MEDIUM 6.5CVSS 3.1Lack of protection against cookie tossing attacks in fastify-csrf
fastify-csrf is an open-source plugin helps developers protect their Fastify server against CSRF attacks. Versions of fastify-csrf prior to 3.1.0 have a "double submit" mechanism using cookies with an application deployed across multiple subdomains, e.g. "heroku"-style platform as a service. Version 3.1.0 of the fastify-csrf fixes it. the vulnerability. The user of the module would need to supply a userInfo when generating the CSRF token to fully implement the protection on their end. This is needed only for applications hosted on different subdomains.
- Published
- 19 May 2021
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-352CWE-565
- Also known as
- GHSA-rc4q-9m69-gqp8
- Sources
- NVDJSONOSV GHSA-rc4q-9m69-gqp8JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | fastify | fastify-csrfcpe:2.3:a:fastify:fastify-csrf:*:*:*:*:*:node.js:*:* |
< 3.1.0 | 3.1.0 |
| OSV | npm | fastify-csrf | < 3.1.0 | 3.1.0 |
References
- https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html · Third Party Advisory, WEB
- https://github.com/fastify/csrf/pull/2 · Patch, Third Party Advisory, WEB
- https://github.com/fastify/fastify-csrf/pull/51 · Patch, Third Party Advisory, WEB
- https://github.com/fastify/fastify-csrf/releases/tag/v3.1.0 · Third Party Advisory, WEB
- https://github.com/fastify/fastify-csrf/security/advisories/GHSA-rc4q-9m69-gqp8 · Patch, Third Party Advisory, WEB
- https://owasp.org/www-pdf-archive/David_Johansson-Double_Defeat_of_Double-Submit_Cookie.pdf · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-29624 · ADVISORY
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 19 May 2021)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 17 May 2021)