CVE-2022-31186
CVE-2022-31186 is a low-severity vulnerability in Next-auth Nextauth.js with a CVSS 3.x base score of 3.3. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-532.
Key facts
- Severity: Low (CVSS 3.x base score 3.3)
- EPSS exploit prediction: 0% (16th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-532
- Affected product: Next-auth Nextauth.js
- Published:
- Last modified:
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.
Frequently asked questions
- What is 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.
- How severe is CVE-2022-31186?
- CVE-2022-31186 has a CVSS 3.x base score of 3.3, rated low severity. It is exploitable over local access with low attack complexity, requires low privileges and no user interaction. Impact on confidentiality is low, integrity none, and availability none.
- Is CVE-2022-31186 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (16th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2022-31186?
- CVE-2022-31186 affects Next-auth Nextauth.js. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2022-31186?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2022-31186 published?
- CVE-2022-31186 was published on 2022-08-01 and last updated on 2026-06-17.
References
- https://github.com/nextauthjs/next-auth/security/advisories/GHSA-p6mm-27gq-9v3p
- https://next-auth.js.org/configuration/options#logger
- https://next-auth.js.org/getting-started/upgrade-v4
- https://next-auth.js.org/warnings#debug_enabled
Affected products (1)
- cpe:2.3:a:next-auth:nextauth.js:*:*:*:*:*:node.js:*:*
Other CWE-532 (Insertion of Sensitive Information into Log File) vulnerabilities
- CVE-2022-36407 — Critical (CVSS 9.9): Insertion of Sensitive Information into Log File vulnerability in Hitachi Virtual Storage Platform, Hitachi Virtual…
- CVE-2023-40029 — Critical (CVSS 9.9): Argo CD is a declarative continuous deployment for Kubernetes. Argo CD Cluster secrets might be managed declaratively…
- CVE-2021-32724 — Critical (CVSS 9.9): check-spelling is a github action which provides CI spell checking. In affected versions and for a repository with the…
- CVE-2026-49200 — Critical (CVSS 9.8): The acer_cgi.log file in the device firmware is accessible without authentication via the web interface. This file…
- CVE-2026-22778 — Critical (CVSS 9.8): vLLM is an inference and serving engine for large language models (LLMs). From 0.8.3 to before 0.14.1, when an invalid…
- CVE-2025-11008 — Critical (CVSS 9.8): The CE21 Suite plugin for WordPress is vulnerable to Sensitive Information Exposure in all versions up to, and…
Browse all CWE-532 (Insertion of Sensitive Information into Log File) vulnerabilities →