CVE-2021-29624
What it is
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.
At a glance
- Exploitability
- Can be exploited over the network without logging in, but needs a user to act. High risk of data tampering.
- Exploit odds
- 0.8% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 0.8% in the next 30 days (EPSS).
- Severity: 6.5 MEDIUM (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 0.8% · EPSS, next 30 days
- Weakness
- CWE-565
- Record status
- Modified
Affected
- Fastify fastify-csrf < 3.1.0
Attack profile CVSS 3.1 · 6.5
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- High
- Availability
- None
Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2021-29624.md and follow it. Check whether this project is affected by CVE-2021-29624. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/fastify/csrf/pull/2
- https://github.com/fastify/fastify-csrf/pull/51
- https://github.com/fastify/fastify-csrf/releases/tag/v3.1.0
- https://github.com/fastify/fastify-csrf/security/advisories/GHSA-rc4q-9m69-gqp8
- https://github.com/fastify/csrf/pull/2
- https://github.com/fastify/fastify-csrf/pull/51
- https://github.com/fastify/fastify-csrf/releases/tag/v3.1.0
- https://github.com/fastify/fastify-csrf/security/advisories/GHSA-rc4q-9m69-gqp8
References
- https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html
- https://github.com/fastify/csrf/pull/2
- https://github.com/fastify/fastify-csrf/pull/51
- https://github.com/fastify/fastify-csrf/releases/tag/v3.1.0
- https://github.com/fastify/fastify-csrf/security/advisories/GHSA-rc4q-9m69-gqp8
- https://owasp.org/www-pdf-archive/David_Johansson-Double_Defeat_of_Double-Submit_Cookie.pdf
- https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html
- https://github.com/fastify/csrf/pull/2
- https://github.com/fastify/fastify-csrf/pull/51
- https://github.com/fastify/fastify-csrf/releases/tag/v3.1.0
- https://github.com/fastify/fastify-csrf/security/advisories/GHSA-rc4q-9m69-gqp8
- https://owasp.org/www-pdf-archive/David_Johansson-Double_Defeat_of_Double-Submit_Cookie.pdf