{"id":"CVE-2021-29624","published":"2021-05-19T21:15:28Z","modified":"2024-08-03T22:11:06Z","title":"Lack of protection against cookie tossing attacks in fastify-csrf","vendor":"fastify","product":"fastify-csrf","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00829,"percentile":0.58429,"provenance":"source"},"cwes":[{"id":"CWE-565","name":"Reliance on Cookies without Validation and Integrity Checking"}],"references":[{"url":"https://github.com/fastify/fastify-csrf/security/advisories/GHSA-rc4q-9m69-gqp8","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/fastify/csrf/pull/2","tags":["x_refsource_MISC"]},{"url":"https://github.com/fastify/fastify-csrf/pull/51","tags":["x_refsource_MISC"]},{"url":"https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html","tags":["x_refsource_MISC"]},{"url":"https://github.com/fastify/fastify-csrf/releases/tag/v3.1.0","tags":["x_refsource_MISC"]},{"url":"https://owasp.org/www-pdf-archive/David_Johansson-Double_Defeat_of_Double-Submit_Cookie.pdf","tags":["x_refsource_MISC"]}],"priority":{"score":16.2,"factors":[{"name":"EPSS percentile","points":11.69},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"fastify","affectedVersions":[{"vendor":"fastify","product":"fastify-csrf","versions":["< 3.1.0"]}],"affected":[{"ecosystem":"npm","package":"fastify-csrf","vulnerableRanges":["<3.1.0"],"patched":["3.1.0"],"from":["GHSA-rc4q-9m69-gqp8"],"provenance":"source"}],"euvd":{"id":"EUVD-2021-1177","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-fastify-csrf-cve-2021-29624","children":[{"from":"CVE-2021-29624","to":"CVE-2023-27495","relation":"related","confidence":"high","kind":"lineage","evidence":[{"kind":"osv-related","provenance":"source","id":"GHSA-qrgf-9gpc-vrxw","via":"reference","url":"https://github.com/fastify/csrf-protection/security/advisories/GHSA-rc4q-9m69-gqp8"}]}],"packageHistory":[{"cve":"CVE-2020-28482","published":"2021-01-19","fixed":"3.0.0","kev":false,"link":{"from":"CVE-2020-28482","to":"CVE-2021-29624","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:fastify-csrf","fromFixed":"3.0.0","toFixed":"3.1.0","daysApart":120}]}},{"cve":"CVE-2021-29624","published":"2021-05-19","fixed":"3.1.0","kev":false}],"package":"npm:fastify-csrf"}}