CVE & CISA-KEV Catalog

CVE-2022-31127

HIGH
7.1
CVSS v3
NVD

Description

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 that contains some malicious HTML, tricking the e-mail server to send it to the user, so they can perform a phishing attack. Eg.: `[email protected], Before signing in, claim your money! `. This was previously sent to `[email protected]`, 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.

How to fix

Remediation Available
next-authNVD
Affected:>= 4.0.0, < 4.9.0Fixed in:4.9.0CVE-2022-31127derived from NVD

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionRequired
ScopeChanged

Impact

ConfidentialityLow
IntegrityLow
AvailabilityLow

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L

Exploit Intelligence

1.05%probability of exploitation in 30 days
60thpercentile

Moderate risk: more likely to be exploited than 60% of all known CVEs.

References

Exploit1
Third-Party Advisory1

Related Vulnerabilities

Other CWE-79 (Cross-Site Scripting (XSS)) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2020-11022Medium6.999%-Fix
CVE-2019-3929Critical9.899%KEVFix
CVE-2020-9496Medium6.199%--
CVE-2023-28341Medium6.199%-Fix
CVE-2018-12998Medium6.198%--
CVE-2025-4123High7.698%-Fix
Embed a live status badge for CVE-2022-31127
CVE-2022-31127 severity badge

Markdown

[![CVE-2022-31127](https://tridentstack.com/cve/badge/CVE-2022-31127.svg)](https://tridentstack.com/cve/CVE-2022-31127)

HTML

<a href="https://tridentstack.com/cve/CVE-2022-31127"><img src="https://tridentstack.com/cve/badge/CVE-2022-31127.svg" alt="CVE-2022-31127"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2024-11-21.