Authentication / Guessable Captcha

Web and API

Description

Guessable CAPTCHA, also known as CWE-801, is a vulnerability that arises when a CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) is used in an authentication system. CAPTCHAs are designed to be difficult for machines to solve, but easy for humans to solve. However, Guessable CAPTCHAs are designed in a way that makes them easy to guess. This can occur when the CAPTCHA is too short, uses weak or common words, or is overly simple. This type of vulnerability is common in web and API applications. As outlined in the OWASP Testing Guide, Guessable CAPTCHAs can be exploited to bypass authentication, leading to unauthorized access.

Risk

The risk associated with this vulnerability is high. This is because it can be used to bypass authentication systems, potentially allowing unauthorized access to sensitive data. An attacker can also use Guessable CAPTCHAs to launch brute force attacks, which can lead to data compromise.

Solution

The best way to mitigate the risk associated with Guessable CAPTCHAs is to ensure that CAPTCHAs are designed in a way that makes them difficult to guess. CAPTCHAs should be long, use complex words and have a variable length. Additionally, CAPTCHAs should be rotated on a regular basis so that attackers cannot use them to launch repeated attacks.

Example

if ($captcha_length < 8) 
{
    $error_message .= 'Please enter a longer CAPTCHA.<br />';
}

This code example checks the length of a CAPTCHA. If the length is less than 8 characters, an error message is generated. This can be used to prevent Guessable CAPTCHAs by ensuring that all CAPTCHAs are of sufficient length.

Curious? Convinced? Interested?

Arrange a no-obligation consultation with one of our product experts today.