{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-29624","id":"CVE-2021-29624","title":"Lack of protection against cookie tossing attacks in fastify-csrf","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 ","descriptionLong":"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.","published":"2021-05-19T21:15:28.000Z","updated":"2026-10-20T10:54:38.921910426Z","reserved":"2021-03-30T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","rating":"medium","source":"GitHub"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","rating":"medium","source":"NVD"}],"rating":"medium","products":["fastify-csrf"],"affectedProducts":[{"vendor":"fastify","product":"fastify-csrf","defaultStatus":null,"versions":[{"status":"affected","version":"< 3.1.0"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"fastify-csrf","purl":"pkg:npm/fastify-csrf","ranges":["<3.1.0"],"fixed":["3.1.0"],"advisory":"GHSA-rc4q-9m69-gqp8"}],"cwes":["CWE-565","CWE-352"],"aliases":["GHSA-rc4q-9m69-gqp8"],"references":[{"url":"https://github.com/fastify/fastify-csrf/security/advisories/GHSA-rc4q-9m69-gqp8","tags":["x_refsource_CONFIRM","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/fastify/csrf/pull/2","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/fastify/fastify-csrf/pull/51","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/fastify/fastify-csrf/releases/tag/v3.1.0","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://owasp.org/www-pdf-archive/David_Johansson-Double_Defeat_of_Double-Submit_Cookie.pdf","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29624","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00829,"epssPercentile":0.583,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-29624","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29624","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-29624","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-rc4q-9m69-gqp8","ok":true,"note":"GHSA-rc4q-9m69-gqp8"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-29624","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}