CVE-2023-31999

published 4 Jul 2023 · updated 26 Nov 2024

All versions of @fastify/oauth2 used a statically generated state parameter at startup time and were used across all requests for all users

5.0MediumEPSS 1%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 1%. Fixed in v7.2.0.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
npm>=v7.2.0 <v7.2.0v7.2.0

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2023-31999 severity on Zeptric[![CVE-2023-31999](https://zeptric.io/badge/cve/CVE-2023-31999.svg)](https://zeptric.io/cve/CVE-2023-31999)