Session Fixation Affecting next-auth package, versions <4.20.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.39% (74th percentile)

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.

Overview

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.

Workaround

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.

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
6.8 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    Required
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    None
Expand this section

NVD

8.8 high