High

Logic error in Legion of the Bouncy Castle BC Java

  • Disclosed: 30.04.2021
  • Updated: 11.10.2026 12:21

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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) org.bouncycastle:bcprov-ext-jdk15on >= 1.65, < 1.67 1.67
Java / Kotlin (Maven) org.bouncycastle:bcprov-ext-jdk16 >= 1.65, < 1.67 1.67
Java / Kotlin (Maven) org.bouncycastle:bcprov-jdk14 >= 1.65, < 1.67 1.67
Java / Kotlin (Maven) org.bouncycastle:bcprov-jdk15 >= 1.65, < 1.67 1.67
Java / Kotlin (Maven) org.bouncycastle:bcprov-jdk15on >= 1.65, < 1.67 1.67
Java / Kotlin (Maven) org.bouncycastle:bcprov-jdk15to18 >= 1.65, < 1.67 1.67
Java / Kotlin (Maven) org.bouncycastle:bcprov-jdk16 >= 1.65, < 1.67 1.67

References

CVSS score 8.1/10
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-670
Platform
Java / Kotlin (Maven)
Package
org.bouncycastle:bcprov-ext-jdk15on, org.bouncycastle:bcprov-ext-jdk16, org.bouncycastle:bcprov-jdk14
Disclosed
30.04.2021
Updated
11.10.2026 12:21

Sources and licenses

OSV / GitHub Advisory Database - GHSA-73xv-w5gp-frxh - CC BY 4.0

Vulnerability history: org.bouncycastle:bcprov-jdk16

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
4
First → latest
04.2021 11.2023
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 1
  • Medium 3

Disclosures per year

  1. 2021: 3
  2. 2022: 0
  3. 2023: 1
  4. 2024: 0
  5. 2025: 0
  6. 2026: 0
  1. Medium · 5.5 CVE-2023-33202 < 1.73 1.73
  2. Medium · 5.1 CVE-2020-15522 < 1.66 1.66
  3. Logic error in Legion of the Bouncy Castle BC Java this entry
    High · 8.1 CVE-2020-28052 >= 1.65, < 1.67 1.67

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.