Skip to content

CWE-307: Weak password reset (4-digit code, no rate limiting) #264

Description

@DogukanUrker

Security Issue: CWE-307 - Weak Password Reset Mechanism

Severity: High
CVSS: 7.5

Description

The password reset functionality uses a 4-digit numeric code (1000-9999), providing only 9000 possible combinations. There is no rate limiting on password reset attempts.

Attack Vector

An attacker can brute-force the password reset code in real-time with no account lockout or rate limiting.

Fix Required

  1. Increase code length to at least 6 digits (1,000,000 possibilities)
  2. Implement rate limiting (e.g., max 3 attempts per 15 minutes)
  3. Add exponential backoff after failed attempts
  4. Consider implementing password reset via secure link instead of numeric code

References

  • CWE-307: Improper restriction of unlimited authentication attempts

Metadata

Metadata

Assignees

No one assigned

    Labels

    securitySecurity-related issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions