CVE-2022-31186 json
Leakage of excessive information into log in next-auth
published 2022-08-01 4 y ago modified 2026-06-17 4 mo ago also GHSA-p6mm-27gq-9v3p , EUVD-2022-6592
- cvss
- 3.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 17%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm next-auth 3.29.9, 4.10.2
- next-auth nextauth.js 3.29.9, 4.10.2
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 18 mo ago
Exploit prediction
0.26% chance of exploitation in the next 30 days, higher than 17% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 3.3 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
| NVD | 3.1 | 3.3 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
| GitHub | 3.1 | 3.3 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | next-auth | <3.29.9 >=4.0.0, <4.10.2 |
3.29.9 4.10.2 |
Affected products
- nextauthjs next-auth
Classification
- Weakness
-
- CWE-532 Insertion of Sensitive Information into Log File
References
-
next-auth.js.org
/getting-started/upgrade-v4
web, vendor-advisory
-
next-auth.js.org
/configuration/options#logger
web, vendor-advisory
-
next-auth.js.org
/warnings#debug_enabled
web, vendor-advisory
-
github.com
/nextauthjs/next-auth/security/advisories/GHSA-p6mm-27gq-9v3p
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-31186
advisory
-
github.com
/nextauthjs/next-auth
package
Sources
- CVE List CVE-2022-31186
- GitHub Advisory GHSA-p6mm-27gq-9v3p
- NVD CVE-2022-31186
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.