{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-42476","id":"CVE-2024-42476","title":"oauth CSRF vulnerability","description":"In the OAuth library for nim prior to version 0.11, the Authorization Code grant and Implicit grant both rely on the `state` parameter to prevent cross-site request forgery (CSRF) attacks where a resource owner might have their session associated with protected resources belonging to an attacker. When this project is compiled with certain compiler flags set, it is possible that the `state` paramet","descriptionLong":"In the OAuth library for nim prior to version 0.11, the Authorization Code grant and Implicit grant both rely on the `state` parameter to prevent cross-site request forgery (CSRF) attacks where a resource owner might have their session associated with protected resources belonging to an attacker. When this project is compiled with certain compiler flags set, it is possible that the `state` parameter will not be checked at all, creating a CSRF vulnerability. Version 0.11 checks the `state` parameter using a regular `if` statement or `doAssert` instead of relying on a plain `assert`. `doAssert` will achieve the desired behavior even if `-d:danger` or `--assertions:off` is set.","published":"2024-08-15T18:48:08.325Z","updated":"2026-10-28T02:30:55.089303272Z","reserved":"2024-08-02T14:13:04.615Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","rating":"medium","source":"OSV"}],"rating":"medium","products":["CORDEA oauth"],"affectedProducts":[{"vendor":"CORDEA","product":"oauth","defaultStatus":null,"versions":[{"version":"< 0.11","status":"affected"}],"platforms":[]}],"packages":[],"cwes":["CWE-352"],"aliases":["GHSA-pc9j-53g7-5x54"],"references":[{"url":"https://github.com/CORDEA/oauth/security/advisories/GHSA-pc9j-53g7-5x54","tags":["x_refsource_CONFIRM","advisory"]},{"url":"https://github.com/CORDEA/oauth/blob/b8c163b0d9cfad6d29ce8c1fb394e5f47182ee1c/src/oauth2.nim#L235","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/CORDEA/oauth/blob/b8c163b0d9cfad6d29ce8c1fb394e5f47182ee1c/src/oauth2.nim#L255","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42476.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42476","tags":["advisory"]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.0024,"epssPercentile":0.1521,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-42476","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42476","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-42476","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-42476","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}