Is there a reason for sites to ask for another CAPTCHA verification when some other part of the registration form, e.g. the username, was invalid?

  • what you mean with "another CAPTCHA"? it did ask once and then after an failed login attempt, it show one another CAPTCHA?
    – VP.
    Commented Apr 26, 2011 at 14:37
  • @VP01: Yes (after a failed registration attempt).
    – user1633
    Commented Apr 26, 2011 at 14:41

5 Answers 5


If the site has a means of knowing it's the same user in the same session, then no. So for example given a cookie or an ssl session then it seems OK to assume it's still a human user (within the limits of captcha).

If it's just a cookie that establishes the session (i.e. this is over http without SSL) then make sure to time it out tho. And you should be using SSL anyhow :-)

  • So this wide-spread practice is just the result of lazy programmers?
    – user1633
    Commented Apr 25, 2011 at 8:13
  • no if the site, without CAPTCHA is vulnerable to CSRF. The browser being authenticated don't means that the user is authenticated to do this action. Example: h-online.com/security/…
    – VP.
    Commented Apr 26, 2011 at 14:33
  • @VP01 - but that is true for every single request. Are you saying that every single request made to the site should have a CAPTCHA? Commented May 2, 2011 at 14:06
  • @João Portela, i don't know where in my comment i stated that. Do I?
    – VP.
    Commented May 2, 2011 at 16:01
  • 1
    maybe this was a wrong use of words on my part. What I meant was: You said that the CAPTCHA avoids CSRF and that it should be kept even after the first CAPTCHA was successfully filled, to avoid CSRF. I also assumed that if the registration page is vulnerable to CSRF so should all of the other site pages be (there no reason to make the registration page less secure for the user). From that I inferred that if he wanted to prevent CSRF he would have to use a CAPTCHA on every request. Summing up: CAPTCHA is not the right tool to avoid CSRF. Commented May 2, 2011 at 17:31

No. But then, was there a reason to ask for a CAPTCHA in the first place?

Let's take a random example of a platform that implements CAPTCHA; say, Stack Exchange. What Stack Exchange sites want is a collection of high-quality questions and answers on a particular topic. There's nothing there that intrinsically requires humans to supply the questions and answers: they just need to be good. This quality of goodness is determined and filtered for after the content has been published, by the community of voters and moderators.

There's also no guarantee that once you've determined the layer 8 hardware is a human, they're predestined to provide good content either. Indeed that's the easiest way to circumvent website CAPTCHAs: find some poor people and give them not very much money to fill in CAPTCHAs for you.

So implementing a CAPTCHA makes it harder for people (much harder, in some cases, as many CAPTCHA mechanisms are inaccessible to people with sight difficulties) to use the platform, while only making it a little bit harder for people to abuse the platform. In return, you get no useful information related to your goal.

  • 2
    Whether CAPTCHAs are useful or not is a subject of discussion. It definitely raises the barrier of entry to spamming, though. Here, I can't see any advantage at all, and was wondering if I had been missing something.
    – user1633
    Commented Apr 25, 2011 at 9:35
  • @Tim, it is only a very slight barrier. Like trying to stop an automobile using marshmallows. It goes back to the point, using CAPTCHA is misplaced in the first place.
    – AviD
    Commented May 3, 2011 at 10:39
  • @Tim see also this question where the (f)utility of CAPTCHA is discussed. security.stackexchange.com/questions/778/…
    – user185
    Commented May 3, 2011 at 12:47
  • I hope I could downvote this answer since only its first 3 chars actually adress que question, you should have made it a comment at most. feel free to start a new question to discuss the effectiveness of using captchas to stop spam. :) Commented May 3, 2011 at 13:34
  • @João: my answer addresses the general question "Why verify with CAPTCHA at all?" of which @Tim's question is a specific case.
    – user185
    Commented May 3, 2011 at 14:27

I think the main reasons are:

  • It is the default behaviour that works out of the box. If the programmer has to rememer that the captcha was solved, he will have to write extra code. And it has to be remembered in a way that cannot be manipulated by the user (e. g. the session), so a <input type="hidden"> field with a flag is no good.
  • After validation of personal information has failed once or twice and the users have to reenter the captcha every time, it gets really annoying. So people are more likely to provide real personal data instead of fake data. (This item only applies to company that ask about a lot of personal information that is not strictly required to offer the service the user is looking for.)

As far as usibility for picking usernames is concerned, I suggest to check them right away using Ajax before the form is submitted. Alternativly you can use email addresses which are (mostly) unique.

Knowing the username may make it easier for an attacker to crack passwords: A smart attacker, who is not interested in one particular account, will pick a password and then brute forces through usernames. So that is something to keep in mind, unless you have a public user directory anyway. Even without a user directory, there is a set of usernames that are likely picked by people. So a rate limit for failed login attempts is required anyway in order to prevent this kind of attack.


That will completely depend on what the purpose of the form is, i.e. what kind of information is being collected.

One very common case is a login re-try after a failed login on a website. In this case the CAPTCHA serves a dual purpose:

  1. It's making it harder to automate login attemps with a bot, thus making it harder to automate a password guessing attack, and
  2. It is slowing down login attempts; making an online brute force attack harder to mount. (Note, this shouldn't be left to the CAPTCHA alone, the backend authentication system should have rate limiting and/or max failed login attemps handling.)

It's also common that the entire form has to be re-submitted if just a single field was wrong. There is really no good technological reason for that, it comes from not prioritizing usability. Using SSL, sessions and CSRF protection tokens the webapp can reliably know that the end user solved the CAPTCHA in his first attempt, and then not require CAPTCHA again -- but it's more work to implement this correctly.

  • Sorry, I forgot to mention that I was thinking about registration forms.
    – user1633
    Commented Apr 25, 2011 at 8:12
  • 1
    Disagree strongly with that - the purpose of a captcha system is to verify the user isn't a bot, and that's it (and obviously these systems have limited effectiveness too). But concerns should be separated. Avoiding password guessing is better done via a measure specific to that issue, e.g. back off delays. Commented Apr 25, 2011 at 8:14
  • @frankodwyer: I didn't say that a CAPTCHA should be the only rate limiting mechanism, that's your reading. :-) But I will make it more clear.
    – user2122
    Commented Apr 25, 2011 at 8:17

The reason to change always the challenge is to make harder for bruteforce attacks. Imagine that the CAPTCHA don't change after the first failed try. So a hacker could first try manually to fill in the form, introduce the right challenge and then start a bruteforce tool, that fills the input box form the captchas always with the same value making the CAPTCHA useless. It is useful to create, for example user mass creation in services like for example, gmail.

  • Why would you brute-force a registration form?
    – user1633
    Commented May 2, 2011 at 6:19
  • i fixed my answer :-)
    – VP.
    Commented May 2, 2011 at 10:29
  • I understand that the CAPTCHA should change after a successful registration, but what about failed ones?
    – user1633
    Commented May 2, 2011 at 11:19
  • 1
    for example, forms that allows the hacker to do user enumeration. e.g: if in the error message you can identify if the user that you are trying to create already exist. You can use it to find valid users and then do a more precise bruteforce :-)
    – VP.
    Commented May 2, 2011 at 13:51
  • usernames are not supposed to be private, being worried that people could now your username is like being worried about people knowing your public key: from a security point of view they are not supposed to be a secret. Commented May 3, 2011 at 13:37

You must log in to answer this question.