Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Why captcha is not a CSRF protection

CAPTCHA consists of two bound values: challenge and response. Challenge is ID of Image. Challenge must not disclose anyhow what response is. Demo:

  1. open
  2. copy challenge value (c param from captcha )
  3. solve captcha yourself and put your data in CSRF Tool
  4. As you can see CAPTCHA doesn't care about request's Origin. It is only a mitigation from automated requests and spam (although not perfect too, e.g.

P.S. yes, challenge can be stored in the cookie but it will remain lame.

TheRook commented May 20, 2013

Isn't the "c param" a valid csrf-token? Wouldn't you have to use XSS to obtain this value to forge the request?


homakov commented Aug 14, 2013

@TheRook no, c param means challenge, it is not stored in cookies and not tied to account. You can change it to your value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment