NextAuth.js up to 3.29.7/4.8.x Email Signin Endpoint cross site scripting
|CVSS Meta Temp Score|
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
|Current Exploit Price (≈)|
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
|CTI Interest Score|
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
NextAuth.js is a complete open source authentication solution for Next.js applications. An attacker can pass a compromised input to the e-mail [signin endpoint](https://next-auth.js.org/getting-started/rest-api#post-apiauthsigninprovider) that contains some malicious HTML, tricking the e-mail server to send it to the user, so they can perform a phishing attack. Eg.: `firstname.lastname@example.org, <a href="http://attacker.com">Before signing in, claim your money!</a>`. This was previously sent to `email@example.com`, and the content of the email containing a link to the attacker's site was rendered in the HTML. This has been remedied in the following releases, by simply not rendering that e-mail in the HTML, since it should be obvious to the receiver what e-mail they used: next-auth v3 users before version 3.29.8 are impacted. (We recommend upgrading to v4, as v3 is considered unmaintained. next-auth v4 users before version 4.9.0 are impacted. If for some reason you cannot upgrade, the workaround requires you to sanitize the `email` parameter that is passed to `sendVerificationRequest` and rendered in the HTML. If you haven't created a custom `sendVerificationRequest`, you only need to upgrade. Otherwise, make sure to either exclude `email` from the HTML body or efficiently sanitize it.
The weakness was shared 07/07/2022 as GHSA-pgjx-7f9g-9463. It is possible to read the advisory at github.com. This vulnerability is known as CVE-2022-31127 since 05/18/2022. It demands that the victim is doing some kind of user interaction. The technical details are unknown and an exploit is not publicly available. The attack technique deployed by this issue is T1059.007 according to MITRE ATT&CK.
Upgrading to version 3.29.8 or 4.9.0 eliminates this vulnerability. The upgrade is hosted for download at github.com. Applying the patch ae834f1e08a4a9915665eecb9479c74c6b039c9c is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.
CVSSv3VulDB Meta Base Score: 5.8
VulDB Meta Temp Score: 5.8
VulDB Base Score: 4.3
VulDB Temp Score: 4.1
VulDB Vector: 🔒
VulDB Reliability: 🔍
NVD Base Score: 6.1
NVD Vector: 🔒
CNA Base Score: 7.1
CNA Vector (GitHub, Inc.): 🔒
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
NVD Base Score: 🔒
ExploitingClass: Cross site scripting
CWE: CWE-79 / CWE-74 / CWE-707
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
Threat IntelligenceInterest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍
0-Day Time: 🔒
Upgrade: NextAuth.js 3.29.8/4.9.0
Timeline05/18/2022 CVE reserved
07/07/2022 +50 days Advisory disclosed
07/07/2022 +0 days VulDB entry created
07/19/2022 +12 days VulDB last update
CVE: CVE-2022-31127 (🔒)
EntryCreated: 07/07/2022 08:56 AM
Updated: 07/19/2022 02:56 PM
Changes: 07/07/2022 08:56 AM (54), 07/19/2022 02:56 PM (18)
Do you know our Splunk app?
Download it now for free!
No comments yet. Languages: en.
Please log in to comment.