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.
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:
Known user with incorrect password:
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:
Acceptance Criteria