CVE-2020-28482 Cross-site Request Forgery (CSRF)

Medium 5.9 Published Updated

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

Weakness: CWE-732, CWE-200

Which versions are affected by CVE-2020-28482?

2 open source packages ship an affected version, including fastify-csrf. It affects 1 product.

PackageAffectedFixed in
fastify-csrf npmAll versions3.0.0
fastify-csrf npmAll versions3.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.

Sources

Also known as GHSA-49wp-qq6x-g2rf, SNYK-JS-FASTIFYCSRF-1062044.

Is CVE-2020-28482 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free