Advisory |
Vulnerability Intelligence |
Type |
Authentication Bypass |
CVE |
CVE-2020-28052 |
Application |
Bouncy Castle API 1.65/1.66 |
Affected Platforms |
Java/C# .NET applications |
CVSS Score: 8.1
Bouncy Castle is a popular Java library to implement cryptographic functionalities in applications. It supports C# and .Net platforms. Recently, an authentication bypass vulnerability was detected in one of the classes handling Bcrypt hashing and is tracked as CVE-2020-28052.
The vulnerability discovered in the OpenBSDBcrypt class has a logical issue in computing the hash matching that allows attackers to evade password checks to bypass authentication into the application. Given below is the code snippet from the form validation method doCheckPassword. It implements a flawed routine to check for the password hash against the stored hash.
Once the attacker bypasses the password check, they don’t need a byte-for-byte match with the stored hash value, which enables authentication bypass. Attackers use brute force attacks to crack passwords until the bypass is triggered.
Here’s a list of major applications that use BouncyCastle (Versions that are not verified):
Bouncy Castle 1.67 (released 11/1/2020) provides a fix for this vulnerability.