Chaining Application-Level DoS with CSRF: A Sneaky Exploit to Block User Logins
The login page blocks an account after five wrong password attempts, requiring a password reset. An attacker who knows a victim's email can repeatedly send wrong passwords from a script while using CSRF to log the victim out, keeping the account locked and preventing login.
Hello Hackers, In this writeup I am going to discuss how I chained application level dos with csrf to restrict users to login to their accounts.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application enforces a per-account lockout after failed logins without any rate limiting or CAPTCHA, and the logout endpoint accepts cross-site GET requests without validating the CSRF token.
Impact
A victim cannot log in to their account until the attacker stops the script, causing frustration and potential loss of users; the attack only works if the victim is logged out first, which the CSRF achieves.
What the attacker needed
Attacker knows victim's email; victim clicks a CSRF link to log out; attacker runs a script continuously
The fix
The application should rate-limit or add CAPTCHA to login attempts and validate CSRF tokens on the logout endpoint.
How it was found
- Create a script that sends batches of wrong-password login requests for the victim's email, pausing between batches to avoid rate limiting.
- Send the victim a CSRF link that logs them out of their session.
- The victim clicks the link and is logged out.
- The victim tries to log in with the correct password but sees the maximum attempts message.
- The victim resets their password, but the script keeps sending wrong passwords, so login still fails.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A website locks an account after too many wrong password tries, to stop guessing. The attacker here knows the victim's email and keeps sending wrong passwords automatically, so the account stays locked. They also trick the victim into clicking a link that logs them out, so the victim cannot stay logged in and must try to log in again, which fails.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.