Skip to content

ECSoC_2026 & ELUSoC_2026 Security: Account Lockout State is Ephemeral (In-Memory) #208

Description

@Sairaj2033

Bug Description

The account lockout system for brute-force protection is currently implemented using a module-level Map in memory, completely ignoring the failedLoginAttempts and lockoutUntil fields that actually exist in the User model.

Because this state is stored in memory, it is destroyed every time the Node.js server restarts. An attacker running a brute-force script only needs to wait for a routine deployment or server reboot to completely reset their failed attempt counter.

Location & Severity

  • File: controllers/Authcontroller.js (Lines 8, 24–45)
  • Severity: High

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions