Leakage of excessive information into log in next-auth
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- Low · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-532.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| nextauthjs | next-auth | 4.0.0 to before 4.10.2; before 3.29.9 | 4.10.2, 3.29.9 | Patch available | CNA |
| — | next-auth (npm) | before 3.29.9 | 3.29.9 | Patch available | GHSA-p6mm-27gq-9v3p |
| — | next-auth (npm) | 4.0.0 to before 4.10.2 | 4.10.2 | Patch available | GHSA-p6mm-27gq-9v3p |
- next-auth Vendornextauthjs Affected 4.0.0 to before 4.10.2; before 3.29.9 Fixed in 4.10.2, 3.29.9 Patch available CNA
- next-auth (npm) Vendor— Affected before 3.29.9 Fixed in 3.29.9 Patch available GHSA-p6mm-27gq-9v3p
- next-auth (npm) Vendor— Affected 4.0.0 to before 4.10.2 Fixed in 4.10.2 Patch available GHSA-p6mm-27gq-9v3p
Remediation
- Fix · CNA next-auth (nextauthjs) Fixed in 4.10.2, 3.29.9
- Fix · GHSA-p6mm-27gq-9v3p next-auth (npm) Fixed in 3.29.9 Advisory →
- Fix · GHSA-p6mm-27gq-9v3p next-auth (npm) Fixed in 4.10.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2022-31186
- 2026-10-03 Alias added: GHSA-p6mm-27gq-9v3p
References
Advisory 5
More nextauthjs vulnerabilities
- TI-2022-13171 Improper handling of email input in next-auth CVSS 3.1HIGH 7.1
- TI-2022-16351 Verification requests (magic link) sent to unwanted emails CVSS 3.1CRITICAL 9.1
- TI-2026-51538 NextAuth.js: Email normalizer validates the address before Unicode normalization, allowing a homoglyph @ bypass CVSS 4.0CRITICAL 9.1
- TI-2026-51539 Improper authorization in nextauthjs next-auth CVSS 4.0CRITICAL 9.1
- TI-2022-13137 Improper Handling of `callbackUrl` parameter in next-auth CVSS 3.1HIGH 7.5
- TI-2023-12218 Missing proper state, nonce and PKCE checks for OAuth authentication in next-auth CVSS 3.1HIGH 8.8
Sources
- CVE-2022-31186 · CVE Program
- CVE-2022-31186 · NVD
- FIRST EPSS
- GHSA-p6mm-27gq-9v3p · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences