CVE-2021-29624: Lack of protection against cookie tossing attacks in fastify-csrf
6.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.50115%
CWE
Published
5/17/2021
Updated
1/28/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
fastify-csrf | npm | < 3.1.0 | 3.1.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from missing user-context binding in CSRF token creation/verification. The patches add 'getUserInfo' to both token generation (create
) and validation (verify
) flows. The modified functions in index.js
directly handled CSRF token lifecycle without user-specific data pre-patch, making them the exploitation points. Runtime detection would observe token processing functions without user-context validation.