Vulnerability · Published May 19, 2021 · Assigned by GitHub_M

CVE-2021-29624Lack of protection against cookie tossing attacks in fastify-csrf

Medium 6.5

In plain English

A medium-severity security flaw in fastify-csrf from fastify. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 58% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)0.8%top 42.3% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npmfastify-csrf3.1.0GHSA-rc4q-9m69-gqp8

Affected products (as reported)

VendorProductVersions
fastify fastify-csrf < 3.1.0

Weakness: CWE-565 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

References