Cross-site Request Forgery (CSRF) Affecting @fastify/oauth2 package, versions <7.2.0


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (16th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cross-site Request Forgery (CSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-FASTIFYOAUTH2-5752413
  • published4 Jul 2023
  • disclosed4 Jul 2023
  • crediterezarnon

Introduced: 4 Jul 2023

CVE-2023-35935  (opens in a new tab)
CWE-352  (opens in a new tab)

How to fix?

Upgrade @fastify/oauth2 to version 7.2.0 or higher.

Overview

@fastify/oauth2 is a Perform login using oauth2 protocol

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) due to mishandling the state parameter, which is not kept unique among users.

NOTE: The fix for this vulnerability contains a breaking change in the checkStateFunction function, which now accepts the full Request object.

NOTE: This vulnerability is also referred to by CVE-2023-31999.

CVSS Base Scores

version 3.1