8.8

CVE-2023-31999: fastify oauth2 Cross-Site Request Forgery (CSRF)

CVSS: 8.8v3.1HighModified
AliasesGHSA-g8x5-p9qc-cf95
Published 04-07-2023Last modified 26-11-2024

Vulnerability summary

CVE-2023-31999 is a high (CVSS 8.8) Cross-Site Request Forgery (CSRF) vulnerability in fastify oauth2. EPSS estimates a 0.70% chance of exploitation in the next 30 days, higher than 52.5% of scored vulnerabilities. 1 public exploit is recorded.

Overall risk
45/100
0100
Medium · default modelHow is this calculated?
CVSS score
8.8/10
010
High · v3.1 (NVD)
EPSS score
0.70%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedIn no KEV catalog
RansomwareNone recordedNo known use recorded
Public exploits1reference

Advisory lineage

Upstream 0 · Downstream 0 · Duplicates 1

Timeline

  1. 04-07-2023
    PublishedVulnerability first disclosed.
  2. 26-11-2024
    Last modifiedVulnerability information updated.

Description

All versions of @fastify/oauth2 used a statically generated state parameter at startup time and were used across all requests for all users. The purpose of the Oauth2 state parameter is to prevent Cross-Site-Request-Forgery attacks. As such, it should be unique per user and should be connected to the user's session in some way that will allow the server to validate it. v7.2.0 changes the default behavior to store the state in a cookie with the http-only and same-site=lax attributes set. The state is now by default generated for every user. Note that this contains a breaking change in the checkStateFunction function, which now accepts the full Request object.

CVSS metrics

2 scores · 2 sources · 1 version

EPSS trend

Probability

0.70%

Chance of exploitation in the next 30 days

Percentile

53%

Versus all other CVEs

30-day change

0.00 pp

From 0.70% on 20-09-2026

20-09-202620-10-2026
EPSS score
0.70%

Known exploited

Compare KEV catalogs

Not in any of the 3 tracked catalogs.

Public exploits

1 found
  • referenceUnverified

    Exploit Reference (auth0.com)

    Maturity: unknown

Weaknesses

CWE · root cause

Affected systems

@fastify1 product
  • oauth2< 7.2.0
Fastify1 product
Npm1 product

3 vendors · 3 products

References

7 links