CVE-2026-73421: CWE-285: Improper Authorization in nextauthjs next-auth
NextAuth.js versions from 5.0.0-beta.0 up to but not including 5.0.0-beta.32 have an improper authorization vulnerability. When the server configuration is invalid, such as missing issuer and authorization endpoint or unset AUTH_SECRET, the auth() wrapper returns a truthy error object instead of null for unauthenticated requests. This causes checks that rely solely on the existence of the auth object to incorrectly grant access to all visitors. The issue is fixed in next-auth 5.0.0-beta.32.
AI Analysis
Technical Summary
NextAuth.js provides authentication for Next.js applications. In versions from 5.0.0-beta.0 until 5.0.0-beta.32, if the server configuration is invalid (e.g., missing issuer and authorization endpoint or unset AUTH_SECRET), the auth() wrapper returns a truthy error object instead of null for unauthenticated requests. This causes authorization checks that only verify the presence of the auth object (e.g., !!auth or if (req.auth)) to fail open, granting access to all visitors despite lack of authentication. The vulnerability is resolved in next-auth 5.0.0-beta.32.
Potential Impact
If the server configuration becomes invalid, routes protected only by checking for the existence of the auth object will silently grant access to all visitors, effectively bypassing authentication. There is no impact while the configuration is valid. This can lead to unauthorized access to protected resources.
Mitigation Recommendations
Upgrade to next-auth version 5.0.0-beta.32 or later where this issue is fixed. Until then, ensure server configuration is always valid to prevent the vulnerability from being triggered. Avoid relying solely on the existence of the auth object for authorization checks.
CVE-2026-73421: CWE-285: Improper Authorization in nextauthjs next-auth
Description
NextAuth.js versions from 5.0.0-beta.0 up to but not including 5.0.0-beta.32 have an improper authorization vulnerability. When the server configuration is invalid, such as missing issuer and authorization endpoint or unset AUTH_SECRET, the auth() wrapper returns a truthy error object instead of null for unauthenticated requests. This causes checks that rely solely on the existence of the auth object to incorrectly grant access to all visitors. The issue is fixed in next-auth 5.0.0-beta.32.
CVSS v4.0
Score 9.1critical
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
NextAuth.js provides authentication for Next.js applications. In versions from 5.0.0-beta.0 until 5.0.0-beta.32, if the server configuration is invalid (e.g., missing issuer and authorization endpoint or unset AUTH_SECRET), the auth() wrapper returns a truthy error object instead of null for unauthenticated requests. This causes authorization checks that only verify the presence of the auth object (e.g., !!auth or if (req.auth)) to fail open, granting access to all visitors despite lack of authentication. The vulnerability is resolved in next-auth 5.0.0-beta.32.
Potential Impact
If the server configuration becomes invalid, routes protected only by checking for the existence of the auth object will silently grant access to all visitors, effectively bypassing authentication. There is no impact while the configuration is valid. This can lead to unauthorized access to protected resources.
Mitigation Recommendations
Upgrade to next-auth version 5.0.0-beta.32 or later where this issue is fixed. Until then, ensure server configuration is always valid to prevent the vulnerability from being triggered. Avoid relying solely on the existence of the auth object for authorization checks.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-08-12T14:32:11.795Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a7e4130bf8831d539e05259
Added to database: 08/13/2026, 22:12:00 UTC
Last enriched: 08/13/2026, 22:26:13 UTC
Last updated: 08/14/2026, 01:51:33 UTC
Views: 23
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.