Password requirements enforced
Why it matters
Weak password requirements are the primary enabler of credential-stuffing attacks: attackers replay breached credential lists at scale and succeed wherever short or trivially guessable passwords are allowed. NIST 800-63B and NIST 800-53 rev5 IA-5(1) mandate a minimum of 8 characters (NIST guidance recommends 12+) with complexity requirements, and AC-7 requires rate-limiting after repeated failed authentication attempts. CWE-521 (Weak Password Requirements) and OWASP A07 both rank this as a systemic authentication failure. Client-only validation is bypassed by any direct API call, so server-side enforcement is non-negotiable.
Severity rationale
High because weak or unrate-limited password endpoints are the direct entry point for automated credential-stuffing and brute-force campaigns targeting every user account.
Remediation
Enforce password complexity and rate-limiting server-side in every password-accepting API route. Client-side validation can improve UX but must never be the sole gate.
// lib/auth-validation.ts
import { z } from 'zod'
export const passwordSchema = z.string()
.min(12, 'Minimum 12 characters')
.regex(/[A-Z]/, 'At least one uppercase letter')
.regex(/[a-z]/, 'At least one lowercase letter')
.regex(/[0-9]/, 'At least one digit')
.regex(/[^A-Za-z0-9]/, 'At least one special character')
Apply rate-limiting at the route level using @upstash/ratelimit or express-rate-limit: no more than 5 password submissions per minute per IP and per user identifier. Validate with Zod before any database interaction — never trust client-supplied values.
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 FISMA/FedRAMP Readiness Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- nist:rev5 · IA-5(1) — Password-Based Authentication
- nist:rev5 · AC-7 — Unsuccessful Logon Attempts
- fedramp:rev5 · IA-5(1) — FedRAMP IA-5(1) — password complexity and minimum length
- cwe · CWE-521 — Weak Password Requirements
- owasp:2021 · A07 — Identification and Authentication Failures
Taxons
History
- 2026-04-18·v1.0.0·Initial import from gov-fisma-fedramp·automated