# CVE-2022-31186: Leakage of excessive information into log in next-auth

- Severity: Low 3.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 19% of CVEs (2026-12-01)
- Published: 2022-08-01T19:25:24.000Z
- Modified: 2026-06-17T04:44:59.163Z
- Also known as: GHSA-p6mm-27gq-9v3p
- Weaknesses: CWE-532
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- nextauthjs next-auth: >= 4.0.0, < 4.10.2; < 3.29.9
- next-auth (npm): before 3.29.9; from 4.0.0 before 4.10.2
- next-auth nextauth.js: before 3.29.9; from 4.0.0 before 4.10.2

## Every score

- GitHub_M: CVSS:3.1 3.3 Low `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 3.3 Low `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:3.1 3.3 Low `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`

## References

- <https://next-auth.js.org/getting-started/upgrade-v4> (vendor-advisory, web)
- <https://github.com/nextauthjs/next-auth/security/advisories/GHSA-p6mm-27gq-9v3p> (third-party-advisory, web)
- <https://next-auth.js.org/configuration/options#logger> (vendor-advisory, web)
- <https://next-auth.js.org/warnings#debug_enabled> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-31186> (advisory)
- <https://github.com/nextauthjs/next-auth> (package)

## Sources

- CVE List: [CVE-2022-31186](https://www.cve.org/CVERecord?id=CVE-2022-31186), CVE Terms of Use, modified 2025-04-23
- GitHub Advisory Database: [GHSA-p6mm-27gq-9v3p](https://github.com/advisories/GHSA-p6mm-27gq-9v3p), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2022-31186](https://nvd.nist.gov/vuln/detail/CVE-2022-31186), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-31186 · Whole record: https://cve.day/CVE-2022-31186.json · Rebuilt by cve.day 2026-11-25T22:58:13.346Z
