api-auth-nextauth
Warn
Audited by Socket on Sep 20, 2026
1 alert found:
SecuritySecurityexamples/middleware.md
MEDIUMSecurityMEDIUM
examples/middleware.md
The fragment is legitimate authentication documentation and contains no evidence of malware or supply-chain backdoor behavior. However, Patterns 2 and 3 contain a significant access-control logic flaw: including "/" in a startsWith-based public-route check makes every route public, bypassing authentication and potentially administrative authorization. Replace prefix checks with exact or boundary-aware matching and remove the root prefix ambiguity. Pattern 1 and the per-page/API checks are materially safer as shown.
Confidence: 99%Severity: 82%
Audit Metadata