{"id":"GHSA-49wp-qq6x-g2rf","summary":"Cross-site Request Forgery in fastify-csrf","details":"The package fastify-csrf before 3.0.0 has a set of issues that affect its ability to do CSRF protection.\n1. The generated cookie used insecure defaults, and did not have the httpOnly flag on: `cookieOpts: { path: '/', sameSite: true }`\n2. The CSRF token was available in the GET query parameter","aliases":["CVE-2020-28482","SNYK-JS-FASTIFYCSRF-1062044"],"modified":"2026-07-08T06:49:32.779628053Z","published":"2021-01-20T21:30:34Z","database_specific":{"github_reviewed_at":"2021-01-20T19:49:01Z","nvd_published_at":"2021-01-19T15:15:00Z","cwe_ids":["CWE-352"],"severity":"HIGH","github_reviewed":true},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-28482"},{"type":"WEB","url":"https://github.com/fastify/fastify-csrf/pull/26"},{"type":"WEB","url":"https://github.com/fastify/fastify-csrf/commit/3c9de36e9e73ce0eda9207f84f2ac0243e1f5253"},{"type":"PACKAGE","url":"https://github.com/fastify/fastify-csrf"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-JS-FASTIFYCSRF-1062044"},{"type":"WEB","url":"https://www.npmjs.com/package/fastify-csrf"}],"affected":[{"package":{"name":"fastify-csrf","ecosystem":"npm","purl":"pkg:npm/fastify-csrf"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.0.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/01/GHSA-49wp-qq6x-g2rf/GHSA-49wp-qq6x-g2rf.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}