GitHub Advisoryadvisory · npm
GHSA-49wp-qq6x-g2rf Cross-site Request Forgery in fastify-csrf
HIGH
Official page ↗
- Aliases
- CVE-2020-28482
- Ecosystem
- npm
- Packages
- fastify-csrf
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Weaknesses
- CWE-352
- Reviewed
- 2021-01-20
Affected packages
• npm fastify-csrf: < 3.0.0 → fixed in 3.0.0
Description
The package fastify-csrf before 3.0.0 has a set of issues that affect its ability to do CSRF protection.
1. The generated cookie used insecure defaults, and did not have the httpOnly flag on: `cookieOpts: { path: '/', sameSite: true }`
2. The CSRF token was available in the GET query parameter
Related
Alias · CVE (1)
- CVE-2020-28482 This affects the package fastify-csrf before 3.0.0. vulnerability
Weakness · CWE (1)
- CWE-352 Cross-Site Request Forgery weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2020-28482 advisory
- https://github.com/fastify/fastify-csrf/pull/26 web
- https://github.com/fastify/fastify-csrf/commit/3c9de36e9e73ce0eda9207f84f2ac0243e1f5253 web
- https://github.com/fastify/fastify-csrf package
- https://snyk.io/vuln/SNYK-JS-FASTIFYCSRF-1062044 web
- https://www.npmjs.com/package/fastify-csrf web