CWE-645 Base Incompleto 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…

Definición

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.
Impacto en el mundo real

Real-world CVEs caused by CWE-645

Todavía no hay CVEs públicos enlazados a esta CWE en el catálogo de MITRE.

Cómo lo explotan los atacantes

Ruta del atacante paso a paso

  1. 1

    Identifica una ruta de código que maneje entrada no confiable sin validación.

  2. 2

    Crea un payload que ejercite el comportamiento inseguro — inyección, traversal, overflow o abuso de lógica.

  3. 3

    Envía el payload a través de una solicitud normal y observa la reacción de la aplicación.

  4. 4

    Itera hasta que la respuesta filtre datos, ejecute código del atacante o escale privilegios.

Ejemplo de código vulnerable

Vulnerable pseudo

MITRE no ha publicado un ejemplo de código para esta CWE. El patrón siguiente es ilustrativo — consulta Recursos para referencias canónicas.

Vulnerable pseudo
// Example pattern — see MITRE for the canonical references.
function handleRequest(input) {
  // Untrusted input flows directly into the sensitive sink.
  return executeUnsafe(input);
}
Ejemplo de código seguro

Secure pseudo

Seguro 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.
Lista de prevención

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).
Señales de detección

How to detect CWE-645

SAST High

Ejecuta análisis estático (SAST) sobre el código buscando el patrón inseguro en el flujo de datos.

DAST Moderate

Ejecuta pruebas dinámicas de seguridad de aplicaciones (DAST) contra el endpoint en vivo.

Runtime Moderate

Vigila los logs en tiempo de ejecución para detectar trazas de excepción inusuales, entradas malformadas o intentos de bypass de autorización.

Code review Moderate

Revisión de código: marca cualquier código nuevo que maneje entrada desde esta superficie sin usar los helpers validados del framework.

Auto-corrección de Plexicus

Plexicus detecta automáticamente CWE-645 y abre un PR de corrección en menos de 60 segundos.

Codex Remedium escanea cada commit, identifica esta debilidad concreta y entrega un pull request listo para revisión con el parche. Sin tickets. Sin traspasos.

Preguntas frecuentes

Frequently asked questions

¿Qué es 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.

¿Qué gravedad tiene CWE-645?

MITRE califica la probabilidad de explotación como Alta — esta debilidad se explota activamente en la práctica y debe priorizarse para su remediación.

¿Qué lenguajes o plataformas se ven afectados por CWE-645?

MITRE no ha especificado plataformas afectadas para esta CWE — puede aplicar a la mayoría de los stacks de aplicaciones.

¿Cómo puedo prevenir CWE-645?

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.

¿Cómo detecta y corrige Plexicus CWE-645?

El motor SAST de Plexicus detecta la firma de flujo de datos para CWE-645 en cada commit. Cuando hay coincidencia, nuestro agente Codex Remedium abre un PR de corrección con el código corregido, las pruebas y un resumen de una línea para el revisor.

¿Dónde puedo aprender más sobre CWE-645?

MITRE publica la definición canónica en https://cwe.mitre.org/data/definitions/645.html. También puedes consultar la documentación de OWASP y NIST para guías relacionadas.

Debilidades relacionadas

Weaknesses related to CWE-645

CWE-287 Padre

Improper Authentication

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

CWE-1390 Hermano

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 Hermano

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 Hermano

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 Hermano

Improper Certificate Validation

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

CWE-306 Hermano

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 Hermano

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 Hermano

Weak Password Requirements

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

CWE-522 Hermano

Insufficiently Protected Credentials

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

Listo cuando tú lo estés

Deja de pagar por desarrollador.
Empieza a cerrar el bucle.

Plexicus es el ASPM nativo de IA que escanea, filtra, corrige, pentestea y explica — de forma autónoma. Desarrolladores ilimitados, repos ilimitados, acciones de IA de uso justo. Nivel gratuito real, €269/mo anual cuando estés listo.