Skip to content
Business logic Write-up Intermediate

Breaking Facebook's Text Captcha

Facebook's text captcha had logic flaws: it accepted answers with one wrong character, was case-insensitive, and repeated the same challenge. An attacker could combine these with image cleaning and OCR to bypass the captcha about half the time.

Meta

Published on pwndizzle.blogspot.in

In this post I'll discuss Facebook's text captcha and how to bypass it with a little Gimp-Fu image cleaning and Tesseract OCR. The techniques below build on previous work where I demonstrated how to bypass Bugcrowd's captcha.

The author, on pwndizzle.blogspot.in

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 validation logic was too permissive (allowing one wrong character, ignoring case) and the challenge generation had insufficient randomness, causing repetition.

Impact

An attacker could bypass the text captcha with a success rate of about 50%, potentially enabling automated attacks such as credential stuffing or account recovery abuse.

What the attacker needed

Ability to trigger the captcha; ability to download captcha images; use of GIMP and Tesseract OCR

The fix

The captcha repetition was fixed, but the other logic flaws were left unchanged; the image was modified to make characters and noise thicker, though this had little effect.

How it was found

  1. Trigger the Facebook captcha by attempting a login or recovery action.
  2. Download the captcha image from the challenge URL.
  3. Clean the image using GIMP to remove noise and repair characters.
  4. Submit the cleaned image to Tesseract OCR with a custom character whitelist.
  5. Use the OCR result as the captcha answer, exploiting the logic flaws to increase success rate.

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 captcha is a test to prove you are human, often by typing distorted letters from an image. Here, the test was too lenient: it allowed small mistakes, ignored upper/lower case, and reused the same images. This made it easier for a computer program to guess the answer and pass the test.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More from Meta

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.