CVE-2020-28482 Cross-site Request Forgery (CSRF)
Insecure cookie defaults and token exposure in GET parameters allow attackers to bypass CSRF protections in applications using this library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2020-28482?
CVE-2020-28482 is a medium-severity vulnerability in fastify-csrf, published on 19 Jan 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
This affects the package fastify-csrf before 3.0.0. 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
Which versions are affected by CVE-2020-28482?
2 open source packages ship an affected version, including fastify-csrf. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
fastify-csrf npm | All versions | 3.0.0 |
fastify-csrf npm | All versions | 3.0.0 |
Products include Fastify Fastify-Csrf.
How do I fix CVE-2020-28482?
Upgrade fastify-csrf to 3.0.0 or later.
Is CVE-2020-28482 being exploited?
There is no known exploitation of CVE-2020-28482 in the wild and no public exploit code.
Other vulnerabilities in fastify-csrf
Sources
Also known as GHSA-49wp-qq6x-g2rf, SNYK-JS-FASTIFYCSRF-1062044.