{"cve":"CVE-2023-27490","nvd":{"published":"2023-03-09T21:15:11.913","modified":"2026-06-17T05:45:19.347","status":"Modified","description":"NextAuth.js is an open source authentication solution for Next.js applications. `next-auth` applications using OAuth provider versions before `v4.20.1` have been found to be subject to an authentication vulnerability. A bad actor who can read traffic on the victim's network or who is able to social engineer the victim to click a manipulated login link could intercept and tamper with the authorization URL to **log in as the victim**, bypassing the CSRF protection. This is due to a partial failure during a compromised OAuth session where a session code is erroneously generated. This issue has been addressed in version 4.20.1. Users are advised to upgrade. Users unable to upgrade may using Advanced Initialization, manually check the callback request for state, pkce, and nonce against the provider configuration to prevent this issue. See the linked GHSA for details.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8},"cwes":["CWE-352","CWE-384"],"references":["https://authjs.dev/reference/core/providers#checks","https://danielfett.de/2020/05/16/pkce-vs-nonce-equivalent-or-not/","https://github.com/nextauthjs/next-auth/security/advisories/GHSA-7r7x-4c4q-c4qf","https://next-auth.js.org/configuration/initialization#advanced-initialization","https://next-auth.js.org/configuration/providers/oauth"],"products":["nextauth.js:next-auth"],"source":"nvd","synced_at":"2026-10-19T21:37:41.955480748+00:00"},"epss":{"cve":"CVE-2023-27490","score":0.00538,"percentile":0.4532,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-7r7x-4c4q-c4qf","url":"https://osv.dev/vulnerability/GHSA-7r7x-4c4q-c4qf","summary":"Missing proper state, nonce and PKCE checks for OAuth authentication","modified":"2026-09-10T03:49:52.759065460Z","packages":[{"ecosystem":"npm","name":"next-auth","purl":"pkg:npm/next-auth","ranges":["<4.20.1"],"fixed":["4.20.1"]}]}],"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."]}