{"id":"CVE-2022-24858","published":"2022-04-19T22:25:10Z","modified":"2025-04-23T18:33:56Z","title":"Default redirect callback vulnerable to open redirects","vendor":"nextauthjs","product":"next-auth","tier":"tail","description":{"text":"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`.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00808,"percentile":0.53756,"provenance":"source"},"cwes":[{"id":"CWE-290","name":"Authentication Bypass by Spoofing"}],"references":[{"url":"https://github.com/nextauthjs/next-auth/security/advisories/GHSA-f9wg-5f46-cjmw","tags":["x_refsource_CONFIRM"]},{"url":"https://next-auth.js.org/configuration/callbacks#redirect-callback","tags":["x_refsource_MISC"]},{"url":"https://next-auth.js.org/getting-started/upgrade-v4","tags":["x_refsource_MISC"]}],"priority":{"score":15.0,"factors":[{"name":"EPSS percentile","points":10.75},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"nextauthjs","affectedVersions":[{"vendor":"nextauthjs","product":"next-auth","versions":["< 3.29.2, < 4.3.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-23T14:08:09.810528Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"next-auth","vulnerableRanges":["<3.29.2",">=4.0.0, <4.3.2"],"patched":["3.29.2","4.3.2"],"from":["GHSA-f9wg-5f46-cjmw"],"provenance":"source"}],"summary":{"text":"The default redirect callback in the next-auth library (versions 3 before 3.29.2 and version 4 before 4.3.2) fails to properly restrict redirect targets, so it can be used to send users to attacker-chosen URLs. An attacker needs network access and must get a victim to interact with a crafted sign-in or redirect link, with no authentication required and no special configuration needed beyond the default setup.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:29:48Z"},"euvd":{"id":"EUVD-2022-1719","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2021-21310","published":"2021-02-11","fixed":"3.3.0","kev":false,"link":{"from":"CVE-2021-21310","to":"CVE-2022-24858","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:next-auth","fromFixed":"3.3.0","toFixed":"3.29.2","daysApart":432}]}},{"cve":"CVE-2022-24858","published":"2022-04-19","fixed":"4.3.2","kev":false},{"cve":"CVE-2022-29214","published":"2022-05-20","fixed":"4.3.3","kev":false,"link":{"from":"CVE-2022-24858","to":"CVE-2022-29214","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:next-auth","fromFixed":"3.29.2","toFixed":"3.29.3","daysApart":31},{"kind":"version-step","provenance":"source","package":"npm:next-auth","fromFixed":"4.3.2","toFixed":"4.3.3","daysApart":31}]}},{"cve":"CVE-2022-31093","published":"2022-06-27","fixed":"4.5.0","kev":false},{"cve":"CVE-2022-31127","published":"2022-07-06","fixed":"4.9.0","kev":false}],"package":"npm:next-auth"}}