CVE-2024-42475CWE-330CWE-352

OAuth library for nim allows insecure generation of state values by generateState - entropy too low and uses regular PRNG instead of CSPRNG

Medium · published August 15, 2024

CVSS v3.1
6.5
EPSS
0%
Percentile
15.5
In the wild
Unconfirmed
What it is

In the OAuth library for nim prior to version 0.11, the `state` values generated by the `generateState` function do not have sufficient entropy. These can be successfully guessed by an attacker allowing them to perform a CSRF vs a user, associating the user's session with the attacker's protected resources. While `state` isn't exactly a cryptographic value, it should be generated in a cryptographically secure way. `generateState` should be using a CSPRNG. Version 0.11 modifies the `generateState` function to generate `state` values of at least 128 bits of entropy while using a CSPRNG.

The record
Technical detail
CVSS v3.1
6.5 · MEDIUM
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
CVSS v4.0
Not supplied
EPSS
0.00250 · 15.5th percentile
Weaknesses
CWE-330 · Use of Insufficiently Random Values; CWE-352 · Cross-Site Request Forgery (CSRF)
Published
2024-08-15T18:40Z
EPSS history
Timeline
  • 15 AUG 18:40Z
    OAuth library for nim allows insecure generation of state values by generateState - entropy too low and uses regular PRNG instead of CSPRNG
    cvelistv5