Quick answers
- Is CVE-2022-24858 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2022-24858 being exploited in the wild.
- How severe is CVE-2022-24858?
- Low severity, with a CVSS score of 3.1, published 22 April 2022.
- Which products and versions are affected?
- next-auth (npm) SEMVER:introduced=0,fixed=3.29.2.
- Is there a fix for CVE-2022-24858?
- Yes. next-auth (npm): upgrade to 3.29.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2022-24858 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2022-24858?
- Check whether you run next-auth (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- next-auth (npm): upgrade to 3.29.2 or later
npm install next-auth@3.29.2
Technical details
The vulnerability is a URL open redirect (CWE-601) in NextAuth.js's default redirect callback. The vulnerable component fails to validate that redirect URLs belong to the same origin before allowing the redirect, accepting any URL provided via user input. An attacker can craft a login URL with a malicious redirect parameter that, after authentication succeeds, sends the user to a phishing or malware site. No special privileges are required, but user interaction (clicking a link) is necessary. The attack is network-reachable. Patches are available in versions 3.29.2 and 4.3.2; alternatively, a custom redirect callback can validate URL origins against the baseUrl.
Affected products
- NextAuth.js next-auth all versions before 3.29.2 and 4.0.0 before 4.3.2
Identifiers
- CVE-2022-24858
- GHSA-f9wg-5f46-cjmw
Timeline
- 2022-04-19: disclosed: NVD publication date
- 2022-04-22: disclosed: GHSA published
- 2022-04-22: patched: Versions 3.29.2 and 4.3.2 released with patch