{"cve":"CVE-2022-31186","nvd":{"published":"2022-08-01T20:15:08.583","modified":"2026-06-17T04:44:59.163","status":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":3.3},"cwes":["CWE-532"],"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","https://github.com/nextauthjs/next-auth/security/advisories/GHSA-p6mm-27gq-9v3p"],"products":["next-auth:nextauth.js"],"source":"nvd","synced_at":"2026-10-19T21:34:18.502168378+00:00"},"epss":{"cve":"CVE-2022-31186","score":0.00256,"percentile":0.17328,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-p6mm-27gq-9v3p","url":"https://osv.dev/vulnerability/GHSA-p6mm-27gq-9v3p","summary":"next-auth before v4.10.2 and v3.29.9 leaks excessive information into log","modified":"2023-11-08T04:09:29.321869Z","packages":[{"ecosystem":"npm","name":"next-auth","purl":"pkg:npm/next-auth","ranges":["<3.29.9"],"fixed":["3.29.9"]},{"ecosystem":"npm","name":"next-auth","purl":"pkg:npm/next-auth","ranges":[">=4.0.0 <4.10.2"],"fixed":["4.10.2"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}