CVE-2024-42476 oauth CSRF vulnerability
Attackers can bypass CSRF protection in the Nim OAuth library when compiled with specific flags, potentially linking victim sessions to attacker resources.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2024-42476?
CVE-2024-42476 is a medium-severity vulnerability in CORDEA oauth, published on 15 Aug 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official 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` 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.
Weakness: CWE-352
Which versions are affected by CVE-2024-42476?
How do I fix CVE-2024-42476?
No fix has been published for CVE-2024-42476 yet. Limit exposure of the affected software until one is available.
Is CVE-2024-42476 being exploited?
There is no known exploitation of CVE-2024-42476 in the wild and no public exploit code.
Sources
Also known as GHSA-pc9j-53g7-5x54.