CVE-2023-31999
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
- Versión: 3.1
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Puntuación base: 8.8
Probabilidad de explotación (EPSS)
- Probabilidad de explotación en los próximos 30 días: 0.70%
- Percentil entre todas las CVEs puntuadas: 52
- Fecha de la puntuación: 6/10/2026
EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).
Tecnologías afectadas (1)
CWE
- CWE-352
Referencias
- https://auth0.com/docs/secure/attack-protection/state-parameters
- https://github.com/fastify/fastify-oauth2/releases/tag/v7.2.0
- https://hackerone.com/reports/2020418
- https://auth0.com/docs/secure/attack-protection/state-parameters
- https://github.com/fastify/fastify-oauth2/releases/tag/v7.2.0
- https://hackerone.com/reports/2020418
JSON original (NVD)
Mostrar
{
"id": "CVE-2023-31999",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2023-31999",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "no"
},
{
"technicalImpact": "total"
}
],
"version": "2.0.3",
"timestamp": "2024-11-26T18:47:12.407468Z"
}
}
],
"cvssMetricV31": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 8.8,
"attackVector": "NETWORK",
"baseSeverity": "HIGH",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"integrityImpact": "HIGH",
"userInteraction": "REQUIRED",
"attackComplexity": "LOW",
"availabilityImpact": "HIGH",
"privilegesRequired": "NONE",
"confidentialityImpact": "HIGH"
},
"impactScore": 5.9,
"exploitabilityScore": 2.8
}
]
},
"affected": [
{
"source": "support@hackerone.com",
"affectedData": [
{
"vendor": "npm",
"product": "@fastify/oauth2",
"versions": [
{
"status": "affected",
"version": "v7.2.0",
"lessThan": "v7.2.0",
"versionType": "semver"
}
],
"defaultStatus": "unaffected"
}
]
}
],
"published": "2023-07-04T17:15:10.657",
"references": [
{
"url": "https://auth0.com/docs/secure/attack-protection/state-parameters",
"tags": [
"Exploit"
],
"source": "support@hackerone.com"
},
{
"url": "https://github.com/fastify/fastify-oauth2/releases/tag/v7.2.0",
"tags": [
"Release Notes"
],
"source": "support@hackerone.com"
},
{
"url": "https://hackerone.com/reports/2020418",
"tags": [
"Permissions Required"
],
"source": "support@hackerone.com"
},
{
"url": "https://auth0.com/docs/secure/attack-protection/state-parameters",
"tags": [
"Exploit"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/fastify/fastify-oauth2/releases/tag/v7.2.0",
"tags": [
"Release Notes"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://hackerone.com/reports/2020418",
"tags": [
"Permissions Required"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Modified",
"weaknesses": [
{
"type": "Primary",
"source": "nvd@nist.gov",
"description": [
{
"lang": "en",
"value": "CWE-352"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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.\r\n\r\nv7.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."
}
],
"lastModified": "2026-06-17T05:57:48.990",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:fastify:oauth2:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "9933CE96-417B-4B0F-9806-CC85E9BA8F50",
"versionEndExcluding": "7.2.0"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "support@hackerone.com"
}