Skip to content

Timing-Based User Enumeration #89

Description

@harshlocham

Timing Side-Channel in Login Authentication

Summary

Login requests for non-existent users complete faster than requests for existing users with incorrect passwords.

Current Behavior

Unknown user:

  • User lookup
  • Immediate failure

Known user with incorrect password:

  • User lookup
  • bcrypt.compare()
  • Failure

Security Impact

An attacker can potentially determine whether an account exists by measuring response latency.

Even if login error messages are unified, the timing difference remains.

Evidence

Observed during login integration testing.

Expected Behavior

Authentication failure paths should have similar execution characteristics.

Possible mitigation:

  • Perform a dummy bcrypt comparison when a user is not found.

Acceptance Criteria

  • Missing-user and invalid-password paths have comparable execution cost.
  • Authentication timing does not reveal account existence.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions