CVE-2021-29624 json
Lack of protection against cookie tossing attacks in fastify-csrf
published 2021-05-17 5 y ago modified 2026-07-08 4 mo ago also GHSA-rc4q-9m69-gqp8 , EUVD-2021-1177
- cvss
- 6.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.8%
- EPSS 0.8% chance of exploitation in 30 days, percentile 57%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm fastify-csrf 3.1.0
- fastify fastify-csrf 3.1.0
- github.com/fastify/csrf#2 pull request
- github.com/fastify/fastify-csrf#51 pull request
- github.com/fastify/fastify-csrf/releases/tag/v3.1.0 release
- github.com/fastify/fastify-csrf/security/advisories/GHSA-rc4q-9m69-gq… advisory
Exploit prediction
0.83% chance of exploitation in the next 30 days, higher than 57% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| NVD | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
| GitHub | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | fastify-csrf | <3.1.0 |
3.1.0 |
Affected products
- fastify fastify-csrf
Classification
References
-
github.com
/fastify/csrf/pull/2
web, patch, third-party-advisory
-
github.com
/fastify/fastify-csrf/pull/51
web, patch, third-party-advisory
-
github.com
/fastify/fastify-csrf/security/advisories/GHSA-rc4q-9m69-gqp8
web, patch, third-party-advisory
-
cheatsheetseries.owasp.org
/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html
web, third-party-advisory
-
github.com
/fastify/fastify-csrf/releases/tag/v3.1.0
web, third-party-advisory
-
owasp.org
/www-pdf-archive/David_Johansson-Double_Defeat_of_Double-Submit_Cookie.pdf
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-29624
advisory
Sources
- CVE List CVE-2021-29624
- GitHub Advisory GHSA-rc4q-9m69-gqp8
- NVD CVE-2021-29624
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.