CVE-2022-31186

Leakage of excessive information into log in next-auth

Description

NextAuth.js is a complete open source authentication solution for Next.js applications. An information disclosure vulnerability in `next-auth` before `v4.10.2` and `v3.29.9` allows an attacker with log access privilege to obtain excessive information such as an identity provider's secret in the log (which is thrown during OAuth error handling) and use it to leverage further attacks on the system, like impersonating the client to ask for extensive permissions. This issue has been patched in `v4.10.2` and `v3.29.9` by moving the log for `provider` information to the debug level. In addition, we added a warning for having the `debug: true` option turned on in production. If for some reason you cannot upgrade, you can user the `logger` configuration option by sanitizing the logs.

Category

3.3
CVSS
Severity: Low
CVSS 3.1 •
EPSS 0.07%
Vendor Advisory js.org Vendor Advisory js.org Vendor Advisory js.org
Affected: nextauthjs next-auth
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2022-31186?
CVE-2022-31186 has been scored as a low severity vulnerability.
How to fix CVE-2022-31186?
To fix CVE-2022-31186, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2022-31186 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2022-31186 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2022-31186?
CVE-2022-31186 affects nextauthjs next-auth.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.