{"answers":{"affected":"4 open source packages ship an affected version, including next-auth. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-31186 in the wild and no public exploit code.","fix":"Upgrade next-auth to a fixed version for your release line: 3.29.9 or 4.10.2.","what":"CVE-2022-31186 is a low-severity vulnerability in nextauthjs next-auth, published on 1 Aug 2022. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-31186 and fix it if it is affected.\n\nWhat it is: CVE-2022-31186 is a low-severity vulnerability in nextauthjs next-auth, published on 1 Aug 2022. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-31186 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- next-auth (npm): affected all versions; fixed in 3.29.9\n- next-auth (npm): affected all versions; fixed in 3.29.9\n- next-auth (npm): affected from 4.0.0; fixed in 4.10.2\n- next-auth (npm): affected from 4.0.0; fixed in 4.10.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-31186/ (Markdown: https://insights.sbomify.com/CVE-2022-31186/index.md)","id":"CVE-2022-31186","markdown":"https://insights.sbomify.com/CVE-2022-31186/index.md","name":"CVE-2022-31186","record":{"aliases":["GHSA-p6mm-27gq-9v3p"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","security_bypass"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"Next.js authentication library","requires_auth":"low_privilege","summary":"Attackers with log access can obtain OAuth secrets from NextAuth.js logs, enabling client impersonation and permission escalation.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"nextauth.js","vendor":"next-auth"}],"cvss":{"score":3.3,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-532","name":"Insertion of Sensitive Information into Log File"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Leakage of excessive information into log in next-auth","id":"CVE-2022-31186","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"information_disclosure","year":"2022"},"n_packages":4,"n_references":4,"next":{"headline":"Stored Cross Site Scripting (XSS) through global search in GLPI","id":"CVE-2022-31187"},"packages":[{"ecosystem":"npm","fixed":["3.29.9"],"introduced":["0"],"last_affected":[],"package":"next-auth","purl":null,"source":"GHSA-p6mm-27gq-9v3p"},{"ecosystem":"npm","fixed":["3.29.9"],"introduced":["0"],"last_affected":[],"package":"next-auth","purl":"pkg:npm/next-auth","source":"GHSA-p6mm-27gq-9v3p"},{"ecosystem":"npm","fixed":["4.10.2"],"introduced":["4.0.0"],"last_affected":[],"package":"next-auth","purl":null,"source":"GHSA-p6mm-27gq-9v3p"},{"ecosystem":"npm","fixed":["4.10.2"],"introduced":["4.0.0"],"last_affected":[],"package":"next-auth","purl":"pkg:npm/next-auth","source":"GHSA-p6mm-27gq-9v3p"}],"prev":{"headline":"Email addresses are not hidden regardless of selected state in mprweb","id":"CVE-2022-31185"},"products":["next-auth"],"published":"2022-08-01","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["nextauthjs"]},"summary":"Attackers with log access can obtain OAuth secrets from NextAuth.js logs, enabling client impersonation and permission escalation.","url":"https://insights.sbomify.com/CVE-2022-31186/"}