Skip to main content
MediumAI codeOWASP A07:2021CWE-521

How to fix: No Password Strength Requirement Enforced

A password registration or reset handler was found without minimum length or complexity requirements. AI-generated user registration accepts any string as a password, including single characters.

Why it matters

Without password strength requirements, users set trivially guessable passwords ('1', 'a', 'password') that an attacker can crack in seconds with a dictionary attack. Combined with no rate limiting, accounts are trivially compromised.

AI registration scaffolding validates that a password field is present and non-empty, but rarely enforces length minimums, complexity requirements, or checks against common password lists.

How to fix it

  1. 1Enforce a minimum password length of 12 characters (NIST recommends 8 minimum, 64 maximum).
  2. 2Check against a list of known-compromised passwords (haveibeenpwned API or zxcvbn).
  3. 3Do not enforce complexity rules (uppercase + number + symbol), they reduce actual entropy; length matters more.
  4. 4Consider checking the password against the user's name and email.

Code examples

Password validation

TypeScript
import zxcvbn from 'zxcvbn';

function validatePassword(password: string, email: string): string | null {
  if (password.length < 12) return 'Password must be at least 12 characters';
  if (password.length > 128) return 'Password must be under 128 characters';
  const result = zxcvbn(password, [email]);
  if (result.score < 2) return `Password too weak: ${result.feedback.suggestions.join(' ')}`;
  return null; // valid
}

References

Detected automatically by VulnRadar. The check id is vibe-weak-password-policy, stable across every scan so you can filter or diff on it.

See every ai code check

Questions

How severe is No Password Strength Requirement Enforced?
VulnRadar rates this medium severity in the ai code category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id vibe-weak-password-policy, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does No Password Strength Requirement Enforced map to?
It maps to CWE-521. In the OWASP Top 10 it falls under A07:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for no password strength requirement enforced

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

No Password Strength Requirement Enforced fix | VulnRadar