{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "versions": [
              {
                "introduced": "0"
              },
              {
                "fixed": "0.11"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "ec2e058fc46f04deaf3cb55eca32b3b83c614953"
            }
          ],
          "repo": "https://github.com/cordea/oauth",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-332c-q46h-fg8f"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-330",
      "CWE-352"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42475.json"
  },
  "details": "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.",
  "id": "CVE-2024-42475",
  "modified": "2025-12-04T02:33:47.595450018Z",
  "published": "2024-08-15T18:40:49.750Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/CORDEA/oauth/blob/b8c163b0d9cfad6d29ce8c1fb394e5f47182ee1c/src/oauth2.nim#L179"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CORDEA/oauth/security/advisories/GHSA-332c-q46h-fg8f"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42475.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-42475"
    }
  ],
  "schema_version": "1.7.3",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "OAuth library for nim allows insecure generation of state values by generateState - entropy too low and uses regular PRNG instead of CSPRNG"
}