NextAuth.js default redirect callback vulnerable to open redirects
Moderate severity
GitHub Reviewed
Published
Apr 19, 2022
in
nextauthjs/next-auth
•
Updated Jan 27, 2023
Description
Published by the National Vulnerability Database
Apr 19, 2022
Published to the GitHub Advisory Database
Apr 22, 2022
Reviewed
Apr 22, 2022
Last updated
Jan 27, 2023
next-auth
v3 users before version 3.29.2 are impacted. (We recommend upgrading to v4 in most cases. See our migration guide).next-auth
v4 users before version 4.3.2 are 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 yourcallbacks
option:If you already have a
redirect
callback, make sure that you match the incomingurl
origin against thebaseUrl
.References