Improper Authorization Affecting next-auth package, versions <3.29.10>=4.10.0 <4.10.3


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.34% (73rd 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 Learn

Learn about Improper Authorization vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-NEXTAUTH-2968127
  • published3 Aug 2022
  • disclosed3 Aug 2022
  • creditUnknown

Introduced: 3 Aug 2022

CVE-2022-35924  (opens in a new tab)
CWE-20  (opens in a new tab)
CWE-285  (opens in a new tab)

How to fix?

Upgrade next-auth to version 3.29.10, 4.10.3 or higher.

Overview

next-auth is an Authentication for Next.js

Affected versions of this package are vulnerable to Improper Authorization in EmailProvider. This is if an attacker can forge a request that sends a comma-separated list of emails to the sign-in endpoint - NextAuth.js would send emails to both the attacker and the victim's e-mail addresses. The attacker could then login as a newly created user which means that basic authorization like email.endsWith("@victim.com") in the signIn callback would fail to communicate a threat to the developer.

References

CVSS Scores

version 3.1