Live threats

All CVEs / Fastify

CVE-2021-29624Fastify-csrf

Medium 6.5 No auth needed

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
Weakness (CWE)
CWE-565, CWE-352
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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Fastify-csrf.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
fastifyfastify-csrf< 3.1.0

Official sources

References

Links published by the sources. Open them with care.