CVE-2023-31999

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-31999
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-31999.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2023-31999
Aliases
Published
2023-07-04T17:15:10Z
Modified
2025-07-02T00:26:30.686436Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/fastify/fastify-oauth2

Affected ranges

Type
GIT
Repo
https://github.com/fastify/fastify-oauth2
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

v0.*

v0.1.0
v0.1.1
v0.1.2
v0.2.0
v0.2.1
v0.2.2

v1.*

v1.0.0

v2.*

v2.0.0
v2.1.0
v2.2.0
v2.3.0
v2.4.0
v2.5.0

v3.*

v3.0.0
v3.1.0
v3.2.0
v3.2.1
v3.3.0
v3.3.1
v3.4.0

v4.*

v4.0.0
v4.1.0
v4.2.0
v4.2.1
v4.2.2
v4.2.3
v4.3.0
v4.4.0
v4.4.1
v4.5.0

v5.*

v5.0.0
v5.1.0

v6.*

v6.0.0
v6.1.0

v7.*

v7.0.0
v7.0.1
v7.1.0
v7.1.1