fastify/fastify-csrf · Security
Cross-site Request Forgery in fastify-csrf
- GHSA ID
- GHSA-49wp-qq6x-g2rf
- CVE ID
- CVE-2020-28482
- Severity
- high
- Published
- Updated
- CVSS
- 8.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- CVSS v3
- 8.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Description
The package fastify-csrf before 3.0.0 has a set of issues that affect its ability to do CSRF protection.
- The generated cookie used insecure defaults, and did not have the httpOnly flag on:
cookieOpts: { path: '/', sameSite: true } - The CSRF token was available in the GET query parameter
CWEs
- CWE-352 · Cross-Site Request Forgery (CSRF)
References
- https://nvd.nist.gov/vuln/detail/CVE-2020-28482 ↗
- https://github.com/fastify/fastify-csrf/pull/26 ↗
- https://github.com/fastify/fastify-csrf/commit/3c9de36e9e73ce0eda9207f84f2ac0243e1f5253 ↗
- https://snyk.io/vuln/SNYK-JS-FASTIFYCSRF-1062044 ↗
- https://www.npmjs.com/package/fastify-csrf ↗
- https://github.com/advisories/GHSA-49wp-qq6x-g2rf ↗