CVE-2021-29624Lack of protection against cookie tossing attacks in fastify-csrf
- 6.5MediumCVSS base score
- 0.83%Exploitation in 30 daysEPSS · top 42% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
Description
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.
Timeline
ID reserved
By GitHub_M
- 50 days later
· 50 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| NVDNVD · Modified | 3.1 | Medium6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
- EPSS (exploitation in 30 days)
- 0.83% · top 42% of all CVEs (15 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.5.
Affected products
- affected < 3.1.0
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- npmfastify-csrfGHSA-rc4q-9m69-gqp8 (opens in a new tab)
References
References6
- https://github.com/fastify/fastify-csrf/security/advisories/GHSA-rc4q-9m69-gqp8 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/fastify/csrf/pull/2 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/fastify/fastify-csrf/pull/51 (opens in a new tab)x_refsource_MISCx_transferred
- https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/fastify/fastify-csrf/releases/tag/v3.1.0 (opens in a new tab)x_refsource_MISCx_transferred
- https://owasp.org/www-pdf-archive/David_Johansson-Double_Defeat_of_Double-Submit_Cookie.pdf (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-1177 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-rc4q-9m69-gqp8 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-29624)Record last updated .