CVE-2021-29624Fastify-csrf
Medium 6.5 No auth needed
Follow: this CVE · Fastify · Fastify-csrf We alert you by email or Slack (account required).
- Priority
- 54
- CVSS 3.1
- 6.5
- EPSS
- 0.8% probability of exploitation in 30 days · percentile 59
- Auth required
- No
- Published
- May 19, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
What happens
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.
What to do
- Apply the vendor's security update for Fastify-csrf.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | fastify-csrf |
< 3.1.0 |
3.1.0 |
npm install fastify-csrf@3.1.0 |
Per OSV / GitHub Advisories (GHSA-rc4q-9m69-gqp8). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| fastify | fastify-csrf | < 3.1.0 |
Official sources
References
Links published by the sources. Open them with care.
- cheatsheetseries.owasp.org Third Party Advisory
- github.com Patch Third Party Advisory
- github.com Patch Third Party Advisory
- github.com Third Party Advisory
- github.com Patch Third Party Advisory
- owasp.org Third Party Advisory