Session Fixation Affecting next-auth package, versions <4.20.1



    Attack Complexity High
    User Interaction Required
    Confidentiality High
    Integrity High

    Threat Intelligence

    Exploit Maturity Proof of concept
    EPSS 0.08% (33rd percentile)
Expand this section
8.8 high

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JS-NEXTAUTH-3358339
  • published 10 Mar 2023
  • disclosed 10 Mar 2023
  • credit Jesse Niininen

How to fix?

Upgrade next-auth to version 4.20.1 or higher.


next-auth is an Authentication for Next.js

Affected versions of this package are vulnerable to Session Fixation such that a bad actor who can read traffic on the victim's network or who is able to social engineer the victim to click a manipulated login link could intercept and tamper with the authorization URL to log in as the victim.


Users unable to upgrade can use Advanced Initialization and manually check the callback request for state, pkce, and nonce against the provider configuration to prevent this issue.