Vulnerability Details : CVE-2022-31186
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.
Vulnerability category: Information leak
Products affected by CVE-2022-31186
- cpe:2.3:a:next-auth:nextauth.js:*:*:*:*:*:node.js:*:*
- cpe:2.3:a:next-auth:nextauth.js:*:*:*:*:*:node.js:*:*
Exploit prediction scoring system (EPSS) score for CVE-2022-31186
0.05%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 12 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2022-31186
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
3.3
|
LOW | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
1.8
|
1.4
|
NIST | |
3.3
|
LOW | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
1.8
|
1.4
|
GitHub, Inc. |
CWE ids for CVE-2022-31186
-
The product writes sensitive information to a log file.Assigned by: security-advisories@github.com (Primary)
References for CVE-2022-31186
-
https://next-auth.js.org/warnings#debug_enabled
Warnings | NextAuth.jsVendor Advisory
-
https://github.com/nextauthjs/next-auth/security/advisories/GHSA-p6mm-27gq-9v3p
Leakage of excessive information into log in next-auth · Advisory · nextauthjs/next-auth · GitHubThird Party Advisory
-
https://next-auth.js.org/configuration/options#logger
Options | NextAuth.jsVendor Advisory
-
https://next-auth.js.org/getting-started/upgrade-v4
Upgrade Guide (v4) | NextAuth.jsVendor Advisory
Jump to