CWE-645 Base Incomplete High likelihood

Overly Restrictive Account Lockout Mechanism

This vulnerability occurs when an application's account lockout feature is too strict, allowing attackers to easily trigger it and lock legitimate users out of their accounts, causing a denial of…

Definition

What is CWE-645?

This vulnerability occurs when an application's account lockout feature is too strict, allowing attackers to easily trigger it and lock legitimate users out of their accounts, causing a denial of service.
Account lockout is a common defense against password-guessing attacks, temporarily disabling an account after several failed login attempts. However, if configured too aggressively—with a very low attempt threshold or an excessively long lockout period—this protective measure can be turned against the system itself. Attackers can exploit this by intentionally failing login attempts for targeted user accounts, denying access to legitimate users. To prevent this, developers must balance security with usability, ensuring lockout policies are strict enough to deter brute-force attacks but not so restrictive that they enable easy denial-of-service.
Auswirkungen in der Praxis

Real-world CVEs caused by CWE-645

Bisher sind in MITREs Katalog keine öffentlichen CVE-Referenzen mit dieser CWE verknüpft.

Wie Angreifer es ausnutzen

Angreiferpfad Schritt für Schritt

  1. 1

    Identifiziere einen Codepfad, der nicht vertrauenswürdige Eingaben ohne Validierung verarbeitet.

  2. 2

    Erzeuge eine Payload, die das unsichere Verhalten auslöst — Injection, Traversal, Overflow oder Logik-Missbrauch.

  3. 3

    Liefere die Payload über einen normalen Request aus und beobachte die Reaktion der Anwendung.

  4. 4

    Iteriere, bis die Antwort Daten preisgibt, Angreifer-Code ausführt oder Berechtigungen eskaliert.

Verwundbares Codebeispiel

Vulnerable pseudo

MITRE hat kein Codebeispiel für diese CWE veröffentlicht. Das untenstehende Muster ist illustrativ — kanonische Referenzen findest du unter Ressourcen.

Verwundbar pseudo
// Example pattern — see MITRE for the canonical references.
function handleRequest(input) {
  // Untrusted input flows directly into the sensitive sink.
  return executeUnsafe(input);
}
Sicheres Codebeispiel

Secure pseudo

Sicher pseudo
// Validate, sanitize, or use a safe API before reaching the sink.
function handleRequest(input) {
  const safe = validateAndEscape(input);
  return executeWithGuards(safe);
}
What changed: the unsafe sink is replaced (or the input is validated/escaped) so the same payload no longer triggers the weakness.
Präventions-Checkliste

How to prevent CWE-645

  • Architecture and Design Implement more intelligent password throttling mechanisms such as those which take IP address into account, in addition to the login name.
  • Architecture and Design Implement a lockout timeout that grows as the number of incorrect login attempts goes up, eventually resulting in a complete lockout.
  • Architecture and Design Consider alternatives to account lockout that would still be effective against password brute force attacks, such as presenting the user machine with a puzzle to solve (makes it do some computation).
Erkennungssignale

How to detect CWE-645

SAST High

Führe statische Analyse (SAST) auf der Codebasis aus und suche im Datenfluss nach dem unsicheren Muster.

DAST Moderate

Führe dynamische Application-Security-Tests gegen den Live-Endpoint aus.

Runtime Moderate

Beobachte Runtime-Logs auf ungewöhnliche Exception-Traces, fehlerhafte Eingaben oder Versuche, Autorisierung zu umgehen.

Code review Moderate

Code Review: Markiere jeden neuen Code, der Eingaben von dieser Oberfläche ohne validierte Framework-Helper verarbeitet.

Plexicus Auto-Fix

Plexicus erkennt CWE-645 automatisch und öffnet in unter 60 Sekunden einen Fix-PR.

Codex Remedium scannt jeden Commit, identifiziert genau diese Schwachstelle und liefert einen reviewer-ready Pull Request mit dem Patch. Keine Tickets. Keine Hand-offs.

Häufig gestellte Fragen

Frequently asked questions

Was ist CWE-645?

This vulnerability occurs when an application's account lockout feature is too strict, allowing attackers to easily trigger it and lock legitimate users out of their accounts, causing a denial of service.

Wie gravierend ist CWE-645?

MITRE stuft die Exploit-Wahrscheinlichkeit als hoch ein — diese Schwachstelle wird aktiv in freier Wildbahn ausgenutzt und sollte priorisiert behoben werden.

Welche Sprachen oder Plattformen sind von CWE-645 betroffen?

MITRE hat für diese CWE keine betroffenen Plattformen spezifiziert — sie kann in den meisten Anwendungs-Stacks auftreten.

Wie kann ich CWE-645 verhindern?

Implement more intelligent password throttling mechanisms such as those which take IP address into account, in addition to the login name. Implement a lockout timeout that grows as the number of incorrect login attempts goes up, eventually resulting in a complete lockout.

Wie erkennt und behebt Plexicus CWE-645?

Die SAST-Engine von Plexicus erkennt die Datenfluss-Signatur von CWE-645 bei jedem Commit. Bei einem Treffer öffnet unser Codex-Remedium-Agent einen Fix-PR mit korrigiertem Code, Tests und einer einzeiligen Zusammenfassung für den Reviewer.

Wo erfahre ich mehr über CWE-645?

MITRE veröffentlicht die kanonische Definition unter https://cwe.mitre.org/data/definitions/645.html. Für ergänzende Hinweise kannst du auch die OWASP- und NIST-Dokumentation heranziehen.

Verwandte Schwachstellen

Weaknesses related to CWE-645

CWE-287 Parent

Improper Authentication

Improper Authentication occurs when a system fails to properly verify a user's claimed identity, allowing access without sufficient proof…

CWE-1390 Sibling

Weak Authentication

This vulnerability occurs when a system's login or identity verification process is too easy to bypass or fool. While it attempts to check…

CWE-290 Sibling

Authentication Bypass by Spoofing

This weakness occurs when an application's authentication system can be tricked into accepting forged or manipulated credentials, allowing…

CWE-294 Sibling

Authentication Bypass by Capture-replay

This vulnerability occurs when an attacker can intercept and record legitimate authentication traffic, then replay it later to gain…

CWE-295 Sibling

Improper Certificate Validation

This vulnerability occurs when an application fails to properly verify the authenticity of a digital certificate, or performs the…

CWE-306 Sibling

Missing Authentication for Critical Function

This vulnerability occurs when a software feature that performs a sensitive action or uses significant system resources does not verify…

CWE-307 Sibling

Improper Restriction of Excessive Authentication Attempts

This vulnerability occurs when an application fails to properly limit how many times someone can attempt to log in or verify their…

CWE-521 Sibling

Weak Password Requirements

This vulnerability occurs when an application fails to enforce strong password policies, making user accounts easier to compromise through…

CWE-522 Sibling

Insufficiently Protected Credentials

This vulnerability occurs when an application handles sensitive credentials like passwords or API keys in an insecure way, making them…

Bereit, wenn du es bist

Schluss mit dem Bezahlen pro Entwickler.
Schließ den Kreislauf.

Plexicus ist die KI-native ASPM, die scannt, filtert, fixt, pentestet und erklärt — autonom. Unbegrenzte Entwickler, unbegrenzte Repos, Fair-Use-KI-Aktionen. Echter kostenloser Tarif, €269/mo jährlich, wenn du bereit bist.