Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minimum length validation for invalid_response?(resp) method in Recaptcha module #461

Open
Akashkarmakar787 opened this issue Jan 7, 2025 · 3 comments

Comments

@Akashkarmakar787
Copy link
Contributor

Spammers can pass random value for the token param (ex: g-recaptcha-response) which can increase the API validation call to recaptcha, consequently incurring more cost.

Most of the Spam attacks we observed attacher sending 1-10 length chars.
It is good to have minimum length 100, validation check to avoid unnecessary API calls to recaptcha.

@grosser
Copy link
Collaborator

grosser commented Jan 8, 2025

yeah that sounds reasonable,
I'd assume the spammers don't target the recaptcha specifically but just fill every form field
PR welcome

@Akashkarmakar787
Copy link
Contributor Author

Akashkarmakar787 commented Jan 9, 2025

@grosser , you are correct. The spammers are not targeting the recaptcha specifically. They are trying to exploit XSS and CSRF attacks on the form fields. But it is increasing the recaptcha cost. Also I
observer cases where the attacker try to exploit the g-recaptcha-response params with XSS payloads.

@Akashkarmakar787
Copy link
Contributor Author

@grosser I have raised the PR: #462

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants