# CVE-2020-28052: Logic error in Legion of the Bouncy Castle BC Java

> The Bouncy Castle Java library incorrectly validates passwords, allowing attackers to bypass authentication using incorrect credentials.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Dec 2020
- **Updated:** 4 Aug 2024
- **Also known as:** DEBIAN-CVE-2020-28052, GHSA-73xv-w5gp-frxh

## What is CVE-2020-28052?

CVE-2020-28052 is a high-severity authentication bypass vulnerability in Bouncycastle Bc-Java, published on 18 Dec 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

An issue was discovered in Legion of the Bouncy Castle BC Java 1.65 and 1.66. The OpenBSDBCrypt.checkPassword utility method compared incorrect data when checking the password, allowing incorrect passwords to indicate they were matching with previously hashed ones that were different.

## Which versions are affected by CVE-2020-28052?

14 open source packages ship an affected version, including org.bouncycastle:bcprov-ext-jdk15on, org.bouncycastle:bcprov-ext-jdk16 and org.bouncycastle:bcprov-jdk14. It affects 20 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.bouncycastle:bcprov-ext-jdk15on` | Maven | From 1.65 | 1.67 |
| `org.bouncycastle:bcprov-ext-jdk15on` | Maven | From 1.65 | 1.67 |
| `org.bouncycastle:bcprov-ext-jdk16` | Maven | From 1.65 | 1.67 |
| `org.bouncycastle:bcprov-ext-jdk16` | Maven | From 1.65 | 1.67 |
| `org.bouncycastle:bcprov-jdk14` | Maven | From 1.65 | 1.67 |
| `org.bouncycastle:bcprov-jdk14` | Maven | From 1.65 | 1.67 |
| `org.bouncycastle:bcprov-jdk15` | Maven | From 1.65 | 1.67 |
| `org.bouncycastle:bcprov-jdk15` | Maven | From 1.65 | 1.67 |
| `org.bouncycastle:bcprov-jdk15on` | Maven | From 1.65 | 1.67 |
| `org.bouncycastle:bcprov-jdk15on` | Maven | From 1.65 | 1.67 |
| `org.bouncycastle:bcprov-jdk15to18` | Maven | From 1.65 | 1.67 |
| `org.bouncycastle:bcprov-jdk15to18` | Maven | From 1.65 | 1.67 |
| `org.bouncycastle:bcprov-jdk16` | Maven | From 1.65 | 1.67 |
| `org.bouncycastle:bcprov-jdk16` | Maven | From 1.65 | 1.67 |

Products: Apache Karaf, Bouncycastle Bc-Java, Oracle Banking Corporate Lending Process Management, Oracle Banking Credit Facilities Process Management, Oracle Banking Extensibility Workbench, Oracle Banking Supply Chain Finance, Oracle Banking Virtual Account Management, Oracle Blockchain Platform, Oracle Commerce Guided Search, Oracle Communications Application Session Controller, Oracle Communications Cloud Native Core Network Slice Selection Function, Oracle Communications Convergence, Oracle Communications Messaging Server, Oracle Communications Pricing Design Center, Oracle Communications Session Report Manager, Oracle Communications Session Route Manager, Oracle Jd Edwards Enterpriseone Tools, Oracle Peoplesoft Enterprise Peopletools, Oracle Utilities Framework, Oracle Webcenter Portal.

## How do I fix CVE-2020-28052?

Upgrade org.bouncycastle:bcprov-ext-jdk15on to 1.67 or later.

## Is CVE-2020-28052 being exploited?

There is no known exploitation of CVE-2020-28052 in the wild and no public exploit code.

Public exploit code:

- A generative test that would've caught CVE-2020-28052 (github_poc): https://github.com/madstap/bouncy-castle-generative-test-poc
- https://github.com/kurenaif/CVE-2020-28052_PoC (github_poc): https://github.com/kurenaif/CVE-2020-28052_PoC

## Other vulnerabilities in Bouncycastle Bc-Java

- [CVE-2026-91012](https://insights.sbomify.com/CVE-2026-91012/): Apache Karaf: Path Traversal in Config Service Allows Manager-to-Admin Privilege Escalation (critical 9.8)
- [CVE-2026-91048](https://insights.sbomify.com/CVE-2026-91048/): Missing authorization in Apache Karaf (critical 9.8)
- [CVE-2022-40145](https://insights.sbomify.com/CVE-2022-40145/): Apache Karaf: JDBC JAAS LDAP injection (critical 9.8)
- [CVE-2018-11788](https://insights.sbomify.com/CVE-2018-11788/): XML External Entity Reference in Apache Karaf (critical 9.8)
- [CVE-2026-92142](https://insights.sbomify.com/CVE-2026-92142/): Apache Karaf: Authorization bypass in JMX MBean lifecycle operations (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-28052 and fix it if it is affected.

What it is: CVE-2020-28052 is a high-severity authentication bypass vulnerability in Bouncycastle Bc-Java, published on 18 Dec 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-28052 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.bouncycastle:bcprov-ext-jdk15on (Maven): affected from 1.65; fixed in 1.67
- org.bouncycastle:bcprov-ext-jdk15on (Maven): affected from 1.65; fixed in 1.67
- org.bouncycastle:bcprov-ext-jdk16 (Maven): affected from 1.65; fixed in 1.67
- org.bouncycastle:bcprov-ext-jdk16 (Maven): affected from 1.65; fixed in 1.67
- org.bouncycastle:bcprov-jdk14 (Maven): affected from 1.65; fixed in 1.67
- org.bouncycastle:bcprov-jdk14 (Maven): affected from 1.65; fixed in 1.67
- org.bouncycastle:bcprov-jdk15 (Maven): affected from 1.65; fixed in 1.67
- org.bouncycastle:bcprov-jdk15 (Maven): affected from 1.65; fixed in 1.67
- org.bouncycastle:bcprov-jdk15on (Maven): affected from 1.65; fixed in 1.67
- org.bouncycastle:bcprov-jdk15on (Maven): affected from 1.65; fixed in 1.67
- org.bouncycastle:bcprov-jdk15to18 (Maven): affected from 1.65; fixed in 1.67
- org.bouncycastle:bcprov-jdk15to18 (Maven): affected from 1.65; fixed in 1.67

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-28052/ (Markdown: https://insights.sbomify.com/CVE-2020-28052/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-28052
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-28052
- OSV: https://osv.dev/vulnerability/CVE-2020-28052

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-28052/
Summaries are generated and may contain mistakes; the official description above is the record.
