Bypassing reCAPTCHA v3 During VAPT: A Case Study in Automated SQLi Validation
A contact number field on a registration endpoint returned database errors when alphabetic input was supplied, suggesting SQL injection. The endpoint was protected by reCAPTCHA v3, so the author built a Selenium-based token harvester to feed fresh tokens to sqlmap; testing confirmed SQL injection-like behaviour but the issue was later judged non-exploitable due to backend constraints.
Published on medium.com
During a recent authorized VAPT engagement, I encountered an interesting scenario where a potential SQL injection point was protected by reCAPTCHA v3, making traditional automated exploitation tools ineffective.
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 improper input validation and unsafe construction of backend database queries for the contact number field.
Impact
The parameter showed SQL injection-like behaviour with error-based database responses, but the issue was determined to be non-exploitable in a real-world scenario due to backend constraints and query structure limitations.
What the attacker needed
Authorized VAPT engagement; target registration endpoint; reCAPTCHA v3 protection present
How it was found
- Test the registration endpoint's contact number field with alphabetic input instead of numeric values.
- Observe that the application returns a database error.
- Build a Selenium-based script that loads the registration page, triggers reCAPTCHA v3 through normal client-side flow, and extracts generated tokens.
- Integrate the token harvester with sqlmap by injecting fresh tokens into requests and maintaining session cookies.
- Run sqlmap to confirm SQL injection-like behaviour through consistent error-based database responses.
- Perform manual verification and impact analysis, concluding the issue is non-exploitable in a real-world scenario.
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 web form field that expects a number was given letters, and the site showed a database error instead of a normal validation message. That kind of error can mean the input is being placed directly into a database query, which is how SQL injection happens. The author then had to work around a bot-protection system (reCAPTCHA v3) to test the field automatically, but in the end decided the flaw could not actually be exploited.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.