CVE-2020-28052 Overview
CVE-2020-28052 is an authentication bypass vulnerability discovered in Legion of the Bouncy Castle BC Java versions 1.65 and 1.66. The vulnerability exists in the OpenBSDBCrypt.checkPassword utility method, which compared incorrect data when validating passwords. This flaw allows incorrect passwords to be incorrectly validated as matching previously hashed passwords, effectively bypassing authentication mechanisms that rely on this library for password verification.
Bouncy Castle is one of the most widely used cryptographic libraries in the Java ecosystem, making this vulnerability particularly impactful across enterprise applications, financial systems, and critical infrastructure that depend on its password hashing capabilities.
Critical Impact
Authentication bypass vulnerability allows attackers to authenticate with incorrect passwords, potentially gaining unauthorized access to systems and sensitive data protected by Bouncy Castle's BCrypt implementation.
Affected Products
- Bouncy Castle BC Java versions 1.65 and 1.66
- Apache Karaf 4.3.2
- Oracle Banking Corporate Lending Process Management (14.2.0, 14.3.0, 14.5.0)
- Oracle Banking Credit Facilities Process Management (14.2.0, 14.3.0, 14.5.0)
- Oracle Banking Extensibility Workbench (14.2.0, 14.3.0, 14.5.0)
- Oracle Banking Supply Chain Finance (14.2.0, 14.3.0, 14.5.0)
- Oracle Banking Virtual Account Management (14.2.0, 14.3.0, 14.5.0)
- Oracle Blockchain Platform
- Oracle Commerce Guided Search 11.3.2
- Oracle Communications Application Session Controller 3.9m0p3
- Oracle Communications Cloud Native Core Network Slice Selection Function 1.2.1
- Oracle Communications Convergence 3.0.2.2.0
- Oracle Communications Pricing Design Center 12.0.0.3.0
- Oracle Communications Session Report Manager
- Oracle Communications Session Route Manager
- Oracle JD Edwards EnterpriseOne Tools
- Oracle PeopleSoft Enterprise PeopleTools (8.56, 8.57, 8.58)
- Oracle Utilities Framework (4.3.0.6.0, 4.4.0.0.0, 4.4.0.2.0, 4.4.0.3.0)
- Oracle WebCenter Portal (11.1.1.9.0, 12.2.1.3.0, 12.2.1.4.0)
- Oracle Communications Messaging Server (8.0.2, 8.1)
Discovery Timeline
- December 18, 2020 - CVE-2020-28052 published to NVD
- May 12, 2025 - Last updated in NVD database
Technical Details for CVE-2020-28052
Vulnerability Analysis
This vulnerability represents an authentication bypass flaw in the Bouncy Castle cryptographic library's OpenBSD-style BCrypt implementation. The OpenBSDBCrypt.checkPassword method contains a logic error in how it compares the computed password hash against the stored hash value.
When a user attempts to authenticate, the method is supposed to hash the provided password using the same salt and parameters as the original hash, then compare the result byte-by-byte with the stored hash. However, due to the comparison bug, the method can incorrectly return true for passwords that don't actually match the original hashed password.
The vulnerability is particularly concerning because BCrypt is specifically designed as a secure password hashing algorithm meant to protect authentication systems. Applications using the affected Bouncy Castle versions for user authentication, session management, or credential storage may be susceptible to unauthorized access.
Root Cause
The root cause of CVE-2020-28052 lies in the flawed comparison logic within the OpenBSDBCrypt.checkPassword method. The implementation compared incorrect portions of data when validating the password hash, leading to scenarios where the comparison would succeed even when the provided password was wrong.
Specifically, the method failed to properly align the data being compared, resulting in a mismatch between what was intended to be compared (the full hash output) and what was actually compared. This type of implementation error in cryptographic code can have severe security implications, as the entire security model depends on correct byte-level comparisons.
Attack Vector
The attack vector for this vulnerability is network-based, requiring no user interaction or special privileges. An attacker can exploit this vulnerability by:
- Identifying an application that uses Bouncy Castle versions 1.65 or 1.66 for password authentication
- Attempting authentication with various incorrect passwords
- Due to the comparison bug, certain incorrect passwords may be accepted as valid
- Once authenticated, the attacker gains unauthorized access to the target system
The exploitation complexity is considered high because successful exploitation depends on specific conditions being met in the hash comparison process. However, the impact upon successful exploitation is severe, potentially compromising confidentiality, integrity, and availability of affected systems.
The vulnerability does not require the attacker to have prior knowledge of the actual password. Instead, the bug in the comparison logic creates conditions where authentication can succeed without providing the correct credentials.
Detection Methods for CVE-2020-28052
Indicators of Compromise
- Unusual successful authentication events from unexpected sources or at unusual times
- Multiple accounts experiencing authentication anomalies simultaneously
- Log entries showing successful logins that don't correlate with expected user behavior
- Authentication audit trails showing access patterns inconsistent with legitimate user activity
Detection Strategies
- Implement software composition analysis (SCA) to identify Bouncy Castle versions 1.65 and 1.66 in your dependency tree
- Monitor authentication logs for anomalous successful login patterns
- Deploy runtime application self-protection (RASP) to detect suspicious authentication behavior
- Conduct periodic security audits of Java applications using BCrypt password hashing
Monitoring Recommendations
- Enable detailed authentication logging for all applications using Bouncy Castle for password validation
- Implement behavioral analytics to detect authentication anomalies that may indicate exploitation
- Monitor dependency management tools for alerts related to vulnerable Bouncy Castle versions
- Set up alerts for unexpected access to sensitive resources following authentication events
How to Mitigate CVE-2020-28052
Immediate Actions Required
- Upgrade Bouncy Castle BC Java to version 1.67 or later immediately
- Audit all applications and dependencies for vulnerable Bouncy Castle versions
- Review authentication logs for potential past exploitation attempts
- Consider forcing password resets for sensitive accounts as a precautionary measure
- Implement additional authentication factors (MFA) to reduce single-point-of-failure risk
Patch Information
The vulnerability has been fixed in Bouncy Castle BC Java version 1.67 and later. Organizations should upgrade to the latest stable version of Bouncy Castle to address this vulnerability. Multiple vendor advisories have been released:
- Bouncy Castle GitHub CVE-2020-28052 Details
- Bouncy Castle Release Notes
- Oracle CPU April 2021
- Oracle CPU July 2021
- Oracle CPU October 2021
- Oracle CPU January 2022
- Oracle CPU April 2022
- Oracle CPU July 2022
For Apache Karaf users, upgrade to a version that includes the patched Bouncy Castle dependency.
Workarounds
- If immediate upgrade is not possible, consider implementing additional authentication validation layers
- Use alternative password hashing methods temporarily while preparing for the upgrade
- Implement IP-based access restrictions to limit potential attack surface
- Deploy additional monitoring and alerting for authentication events
- Consider using a Web Application Firewall (WAF) with behavioral analysis capabilities
# Maven dependency update example
# Update pom.xml to use patched Bouncy Castle version
# Replace:
# <dependency>
# <groupId>org.bouncycastle</groupId>
# <artifactId>bcprov-jdk15on</artifactId>
# <version>1.65</version>
# </dependency>
# With:
# <dependency>
# <groupId>org.bouncycastle</groupId>
# <artifactId>bcprov-jdk15on</artifactId>
# <version>1.70</version>
# </dependency>
# Verify no vulnerable versions remain in dependency tree
mvn dependency:tree | grep -i bouncycastle
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


