CAPTCHA

Also known as: Completely Automated Public Turing test to tell Computers and Humans Apart

On this page 7

A CAPTCHA, short for Completely Automated Public Turing test to tell Computers and Humans Apart, is a challenge-response mechanism that a web application presents to decide whether a request comes from a person or from an automated program. In application security and wider cybersecurity, CAPTCHAs protect sign-up forms, login pages, checkout flows and comment fields against bots that create fake accounts, test stolen passwords or flood services with spam.

The original idea relied on tasks that humans solve easily and computers could not, such as reading distorted text. Advances in machine learning have eroded that gap, so modern CAPTCHA systems rely increasingly on behavioral and environmental risk signals and treat the visible puzzle as a fallback rather than the main defense.

How a CAPTCHA challenge is issued and verified

A CAPTCHA works as a server-verified token exchange. The page loads a widget, the widget presents a challenge or silently collects signals, and on success it returns a short-lived response token that the browser submits together with the form.

The decisive step happens on the server. The application backend sends the token and a secret key to the verification service, which confirms that the token is valid, unused, recent and issued for the correct site. Skipping server-side verification is one of the most frequent implementation mistakes, because a client-side check alone can simply be bypassed by posting the form directly.

StepWhere it runsSecurity purpose
Widget loads with site keyBrowserBinds the challenge to the domain
Challenge or signal collectionBrowser and providerEstimates human likelihood
Response token issuedProviderProves a challenge was passed
Token verificationApplication serverConfirms validity, age and single use
Decision on score or resultApplication serverAllows, blocks or adds friction
Steps in a typical CAPTCHA verification flow

Types of CAPTCHA and their trade-offs

CAPTCHA designs differ mainly in how much effort they ask from the user and which signal they trust. Early schemes used distorted text; later schemes moved to image classification, simple interactions and finally invisible scoring that asks nothing of most visitors.

TypeUser taskStrength todayMain drawback
Text CAPTCHARead distorted charactersWeak against OCR modelsPoor accessibility
Image selectionPick matching tilesModerateSlow and frustrating
Checkbox challengeClick one boxModerate with risk analysisRelies on tracking signals
Invisible scoringNothing visibleGood as one signalOpaque false positives
Proof-of-workBrowser computes a puzzleRaises bot costBurdens slow devices
Audio CAPTCHATranscribe spoken digitsWeak against speech modelsHard in noisy settings
Common CAPTCHA types compared

Proof-of-work challenges and privacy-oriented services avoid profiling the user and instead make each request computationally expensive. They do not prove humanity; they raise the cost of automation, which is often the more realistic goal.

CAPTCHA within broader bot defense

A CAPTCHA is one control in a layered bot-management strategy, not a complete solution. It complements rate limiting, account lockout, credential-stuffing detection and web application firewall rules, each of which addresses a different part of automated abuse.

ControlWhat it limitsRelation to CAPTCHA
Rate limitingRequests per client or accountThrottles volume; CAPTCHA adds friction to suspects
Multi-factor authenticationUse of stolen passwordsStronger for login; CAPTCHA filters noise first
Device fingerprintingRepeat clients across sessionsFeeds risk scores behind invisible CAPTCHAs
Web application firewallKnown attack patternsBlocks payloads; CAPTCHA targets automation
Input validationMalformed or malicious dataUnrelated to human detection
How CAPTCHA relates to neighboring controls

A sound pattern is adaptive friction: normal traffic passes untouched, while requests with elevated risk, such as many failed logins from one network range, receive a challenge. This keeps the user experience smooth and spends the challenge where it actually changes attacker economics.

Implementing a CAPTCHA securely

Secure implementation depends far more on server-side handling than on the widget chosen. The checklist below reflects the controls that reviewers most often find missing.

  • Verify every token on the server, and reject requests that omit it rather than treating absence as success.
  • Enforce single use and short expiry, typically about two minutes, to stop token replay.
  • Check the hostname and action returned by the verification response so tokens from other pages are refused.
  • Keep the secret key out of client code and source repositories, and rotate it if exposed.
  • Define a failure policy for when the provider is unreachable, choosing between fail-open and fail-closed per endpoint.

Score-based services return a value, often between 0.0 and 1.0, rather than a pass or fail. Thresholds must be tuned with real traffic: a threshold that is too strict blocks legitimate users behind corporate proxies or privacy tools, while one that is too lenient lets bots through.

Score rangeInterpretationSuggested action
0.7 to 1.0Likely humanAllow without friction
0.3 to 0.7UncertainShow visible challenge or require email check
0.0 to 0.3Likely automatedBlock or require strong verification
Typical responses to a risk score

Limitations, accessibility and privacy concerns

The central limitation is that modern AI models solve many visual and audio puzzles at rates comparable to or better than humans. In addition, CAPTCHA-solving services employ low-paid human workers who solve challenges in real time for a small fee per thousand, so a determined attacker can pass almost any visible challenge.

Accessibility is a serious concern. Visual puzzles exclude blind and low-vision users, audio alternatives exclude deaf users, and both burden people with cognitive disabilities. Accessibility guidelines such as WCAG call for alternatives in more than one modality, and many teams now prefer invisible or proof-of-work approaches for this reason.

Privacy forms the third concern. Invisible scoring often depends on cookies, browsing history and device signals collected by a third party, which may require consent under data protection law. A CAPTCHA that silently profiles users can therefore create compliance obligations alongside its security benefit.

A plain-language summary

A CAPTCHA is a small test for humans on a website. It checks that a real person, not a computer program, is filling in a form. Sometimes it asks you to click a box. Sometimes it asks you to pick pictures of traffic lights. At other times it simply watches how the page is used and lets you through.

It works like a doorman who waves in regular guests but asks a question when someone looks suspicious. The key point is that it slows down automated abuse but does not stop every attacker, so websites combine it with other protections.

An example from practice

An online ticket seller notices that a new concert release triggers thousands of account sign-ups per minute from a small set of cloud hosting networks, followed by bulk purchases that resellers later offer at inflated prices. The login page also shows a sharp rise in failed attempts, a typical sign of credential stuffing.

The security team adds a score-based CAPTCHA to sign-up, login and checkout, verifies each token on the server with strict hostname checks, and shows a visible challenge only when the score falls below 0.5. Rate limits of five failed logins per account per 15 minutes and mandatory email verification for new accounts complement the change.

During the next release, automated sign-ups drop by more than 90 percent according to the team’s own logs, while ordinary buyers rarely see a puzzle. The outcome is fairer access to tickets with minimal friction for genuine customers.