Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2022-31186

LOW 3.3EPSS 19%

Leakage of excessive information into log in next-auth

Also known as GHSA-p6mm-27gq-9v3p

Mitigation

  • Upgrade next-auth to one of 3.29.9, 4.10.2 (or later in the same release line).

Who should check

  • Projects that depend on npm package next-auth (< 3.29.9)
  • Anyone running nextauthjs next-auth >= 4.0.0, < 4.10.2; < 3.29.9

Vulnerability facts

Affected
next-auth < 3.29.9
Fixed in
3.29.9, 4.10.2
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
3.3 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: Low
  • Privileges required: Low
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: Low
  • Integrity impact: None
  • Availability impact: None
EPSS
0.33% chance of exploitation in 30 days (percentile 19, 2026-11-26)
CWE
CWE-532
Published
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.

Affected and fixed versions

Package / productAffectedFixedSource
npm next-auth< 3.29.93.29.9, 4.10.2osv
nextauthjs next-auth>= 4.0.0, < 4.10.2; < 3.29.9—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2022-31186. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-31186.md
Affected: next-auth < 3.29.9
Fixed in: 3.29.9, 4.10.2

Steps:
1. Search this machine and project for next-auth (npm), nextauthjs next-auth: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2022-31186 being exploited?

There is no confirmed exploitation: CVE-2022-31186 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.33% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2022-31186?

Low: CVSS 3.3 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

Which versions are affected by CVE-2022-31186?

next-auth < 3.29.9.

Is there a fix for CVE-2022-31186?

Yes. Fixed in 3.29.9, 4.10.2. Upgrade next-auth to one of 3.29.9, 4.10.2 (or later in the same release line).

How do I check if I'm affected by CVE-2022-31186?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors