LiveActive security incident?Get immediate response
CVE Record

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

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.

LowCVSS 3.3Not KEV-listedUpdated
Glexia's TakeAutomated analysislow

Security readout for executives and security teams

Plain-English summary

CVE-2022-31186 is a low-severity information disclosure issue in next-auth. Under OAuth error handling, vulnerable versions could write excessive provider details, including secrets, into logs. The main risk is not remote takeover by itself; it is exposure to anyone who can read application or aggregated logs.

Executive priority

Handle through normal patch and hygiene processes, not emergency response, unless logs show exposed provider secrets. Prioritize systems with broad log access or sensitive OAuth integrations.

Technical view

next-auth before v4.10.2 and v3.29.9 could log provider information during OAuth error handling. The advisory states this could expose an identity provider secret. The fix moved provider information logging to debug level and added a production warning for debug:true. CWE-532 applies: sensitive information written to log files.

Likely exposure

Exposure is limited to applications using next-auth versions >=4.0.0 and <4.10.2, or v3 before 3.29.9. Risk is highest where OAuth providers are configured and logs are accessible to staff, contractors, support tooling, or centralized logging platforms.

Exploitation context

The CVSS vector is local with low privileges required and no user interaction. The source bundle does not show KEV listing or active exploitation. A practical attacker would need log access, then could use exposed provider secrets to support further attacks.

Researcher notes

Evidence supports information disclosure through logging, not direct remote compromise. Validation should focus on version inventory, OAuth error paths, debug settings, logger overrides, and historical log exposure. Do not assume exploitation without log-access evidence.

Mitigation direction

  • Upgrade next-auth to v4.10.2 or later, or v3.29.9 if staying on v3.
  • If upgrading is delayed, configure logger sanitization to remove provider secrets from logs.
  • Disable debug:true in production unless explicitly required and protected.
  • Restrict access to application logs and downstream log aggregation systems.
  • Rotate any provider secrets found in historical logs.

Validation and detection

  • Identify all applications using next-auth and record installed versions.
  • Check package locks for versions before v4.10.2 or v3.29.9.
  • Review production configuration for debug:true and custom logger behavior.
  • Inspect relevant OAuth error logs for exposed provider secrets.
  • Confirm log aggregation access is limited to authorized personnel.
Prepared
Confidence
high
Sources
6

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-532: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Credential and access behavior lookup

The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-31186 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Low
CVSS
3.3 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
5Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
3.3CVSS 3.1LowCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N1.81.4Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

3.3Low
CVSS 3.1 vector shape for CVE-2022-31186Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
nextauthjsnext-auth>= 4.0.0, < 4.10.2, < 3.29.9Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-532 · source CWE mapping

Insertion of Sensitive Information into Log File

Insertion of Sensitive Information into Log File represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.