Cyber Resilience

CVE-2023-27490

Auth Bypass in Nextauth.Js Next-Auth ≤ 4.20.1

Public PoCAuth BypassCSRF
Published
09 March 2023
Modified
21 November 2024
Patch / advisory
CVSS Score v3.1 8.1
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
EPSS Score 0.0054 43th percentile
Risk Priority 60 floored blend · peak EPSS

Summary

CVE-2023-27490 is a high-severity CSRF (CWE-352) vulnerability in Nextauth.Js Next-Auth. Its CVSS base score is 8.1 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked at the 43th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1539 Steal Web Session Cookie Credential Access
An adversary may steal web application or service session cookies and use them to gain access to web applications or Internet services as an authenticated user without needing credentials.
T1550.004 Web Session Cookie Lateral Movement
Adversaries can use stolen session cookies to authenticate to web applications and services.
T1606 Forge Web Credentials Credential Access
Adversaries may forge credential materials that can be used to gain access to web applications or Internet services.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-45773Shared CWE-352, CWE-384
CVE-2023-29020Shared CWE-352, CWE-384
CVE-2025-56400Shared CWE-352, CWE-384
CVE-2025-46605Shared CWE-384
CVE-2026-31940Shared CWE-384
CVE-2025-1412Shared CWE-384
CVE-2026-40082Shared CWE-384
CVE-2025-52689Shared CWE-384
CVE-2025-22216Shared CWE-384
CVE-2023-50920Shared CWE-384

Affected Assets

nextauth.js
next-auth
≤ 4.20.1

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V3.3.2
  • V3.5.1
  • V10.2.1
  • V4.4.4

Likely Mitigating Controls AI

Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-352 CWE-384

Requiring user re-entry of credentials for sensitive actions prevents automated forgery of requests without active user participation.

addresses: CWE-384

Session termination after a set interval shortens the usable lifetime of a fixed session identifier, making successful exploitation of session fixation more difficult.

addresses: CWE-352

Awareness training educates users on avoiding untrusted links and actions that can be exploited via CSRF.

addresses: CWE-352

Security testing regimens explicitly include checks for missing or ineffective anti-CSRF protections in web applications.

addresses: CWE-384

Enforces proper session ID generation and binding, preventing fixation of a known session token.

addresses: CWE-352

Detects anomalous request patterns consistent with cross-site request forgery.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.AA-03 mostly match
prevents

Proper authentication processes must invalidate prior session identifiers to prevent fixation attacks.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly require anti-CSRF controls such as tokens or SameSite attributes.

PR.AA-01 partial match
prevents

Managing identities and credentials includes handling session identifiers as temporary credentials that must be invalidated on re-authentication.

PR.AA-04 partial match
prevents

Protecting and verifying identity assertions encompasses secure handling and regeneration of session tokens.

PR.PS-01 partial match
prevents

Configuration baselines can enforce session regeneration and timeout settings that block fixation.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing can detect session-fixation issues, yet the weakness absence does not replace comprehensive testing.

degrades

Access-control policy can mandate session invalidation on re-authentication, but does not prescribe the technical mechanism.

degrades

Identity-management procedures can require new session tokens after login, yet the control is broader than session handling.

degrades

Authentication-information rules can include session-token lifecycle requirements, but the control focuses on credential management.

mitigates

By denying access to phishing or malicious sites, the control lowers the likelihood that a user will be tricked into submitting a forged request that performs an unintended action on another site.

prevents

Secure-SDLC requirement can embed session-fixation checks, but eliminating the weakness does not satisfy the full SDLC control.

References