Cross-site Request Forgery (CSRF)

Affecting fastify-csrf package, versions <3.0.0

Report new vulnerabilities
Do your applications use this vulnerable package? Test your applications

Overview

fastify-csrf is an A plugin for adding CSRF protection to Fastify.

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF). The generated cookie used insecure defaults, and did not have the httpOnly flag on: cookieOpts: { path: '/', sameSite: true }. Also, the CSRF token was available in the GET query parameter

Remediation

Upgrade fastify-csrf to version 3.0.0 or higher.

References

CVSS Score

5.9
medium severity
  • Attack Vector
    Network
  • Attack Complexity
    High
  • Privileges Required
    None
  • User Interaction
    Required
  • Scope
    Unchanged
  • Confidentiality
    High
  • Integrity
    Low
  • Availability
    None
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N
Credit
Xhelal Likaj
CVE
CVE-2020-28482
CWE
CWE-352
Snyk ID
SNYK-JS-FASTIFYCSRF-1062044
Disclosed
19 Jan, 2021
Published
19 Jan, 2021