DefGuard / DefGuard/defguard

Rate-limit VPN MFA proof failures per device (durable, not session-scoped)

Open
#3,571 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.8k
Forks
115
Avg merge
1d 4h
Merged PRs (30d)
51

Description

MFA_FAILED_ATTEMPT_CAP = 5 lives on vpn_client_mfa_session.failed_attempts and is reset every time start_client_mfa_login supersedes the session - which needs only a location id and the device's WireGuard pubkey, no proof. An attacker can loop start → wrong codes → start indefinitely, so the cap bounds nothing except the TOTP code's own 30s validity window. Add a durable
per-(location, device) failure counter (or cooldown) that survives session deletion so repeated guesses are actually bounded. Follow-up hardening to #3043.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.