CAPTCHA Cracked: How I Bypassed Rate Limiting Using a Simple Race
A contact form with a CAPTCHA and a one-per-minute rate limit could be submitted many times at once because the CAPTCHA token was not invalidated and the rate limit was not enforced under concurrency. An attacker could send parallel requests to create many submissions, enabling spam and database pollution.
Published on medium.com
This was one of those “just testing something random” moments. I was looking at famous bug bounty hosting website’s contact form, which had a basic CAPTCHA in place to prevent spam.
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 CAPTCHA token was not invalidated after first use and the rate limit was not enforced atomically, so concurrent requests all passed the checks.
Impact
Spammers could flood the form, create fake registrations and pollute the database, though this was not a direct security breach like XSS or SQLi.
What the attacker needed
Access to the contact form; ability to solve one CAPTCHA; ability to send parallel requests
The fix
The CAPTCHA token should be invalidated immediately on first use and rate limits should be enforced at the IP or session level, which the report says was done.
How it was found
- Fill in the contact form and complete the CAPTCHA.
- Capture the submission request in Burp and send it to Repeater.
- Duplicate the request five times in a group.
- Send all requests in parallel.
- Check each response; every one returned 201 Created with a unique ID.
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 race condition happens when a website checks something (like a CAPTCHA or a rate limit) but then does not lock it, so several requests arriving at the same moment all pass the check. Here the CAPTCHA token stayed valid and the one-per-minute limit was not applied when requests were sent in parallel, so many submissions were accepted. This lets a spammer flood the form.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.