Email verification is required on signup
Why it matters
Without email verification, any user can register with someone else's email address, potentially locking the legitimate owner out of your service, triggering unwanted emails to that person, or establishing a fraudulent account linked to a real identity. CWE-287 (Improper Authentication) applies when you grant full account access without confirming control of the supplied credential. OWASP A07 (Identification and Authentication Failures) covers unverified account creation among its failure modes, and identity-proofing frameworks in NIST SP 800-63A treat unverified claimed identifiers as a category-one enrollment weakness.
Severity rationale
High because unverified accounts enable account enumeration, email harassment of third parties, and fraudulent account creation at scale with no authentication of the claimed identity.
Remediation
Send a verification email at registration and gate access to sensitive features until the email is confirmed. Use a time-limited, single-use token for the verification link:
// src/app/api/auth/register/route.ts
const verificationToken = crypto.randomBytes(32).toString('hex')
await db.user.create({
data: {
email, passwordHash,
emailVerified: false,
verificationToken: crypto.createHash('sha256').update(verificationToken).digest('hex'),
verificationExpiry: new Date(Date.now() + 86_400_000) // 24h
}
})
await sendVerificationEmail(email, verificationToken)
// In middleware or layout — redirect unverified users:
if (!session.user.emailVerified) redirect('/verify-email')
NextAuth, Clerk, and Supabase Auth all support email verification natively — check configuration to confirm it's enabled rather than assuming the default is on.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Authentication Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-287 — Improper Authentication
- owasp:2021 · A07
- soc2:2017 · CC6.2 — User registration, authorization, and access removal
Taxons
History
- 2026-04-18·v1.0.0·Initial import from saas-authentication·automated
- 2026-07-06·v1.0.1·Add SOC 2 TSC mapping (CC6.2) from the verified compliance crosswalk register (docs/compliance/).·by soc2-mapping-enrichment-ship-2