Medium

Improper Validation of Integrity Check Value in Bouncy Castle

  • Disclosed: 13.05.2022
  • Updated: 11.10.2026 11:21

The default BKS keystore use an HMAC that is only 16 bits long, which can allow an attacker to compromise the integrity of a BKS keystore. Bouncy Castle release 1.47 changes the BKS format to a format which uses a 160 bit HMAC instead. This applies to any BKS keystore generated prior to BC 1.47. For situations where people need to create the files for legacy reasons a specific keystore type "BKS-V1" was introduced in 1.49. It should be noted that the use of "BKS-V1" is discouraged by the library authors and should only be used where it is otherwise safe to do so, as in where the use of a 16 bit checksum for the file integrity check is not going to cause a security issue in itself.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) org.bouncycastle:bcprov-jdk15on < 1.50 1.50

References

CVSS score 4.4/10
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Weakness (CWE)
CWE-354
Platform
Java / Kotlin (Maven)
Package
org.bouncycastle:bcprov-jdk15on
Disclosed
13.05.2022
Updated
11.10.2026 11:21

Sources and licenses

OSV / GitHub Advisory Database - GHSA-8477-3v39-ggpm - CC BY 4.0

Vulnerability history: org.bouncycastle:bcprov-jdk15on

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.

All (25) in the archive
Total entries
25
First → latest
10.2018 04.2026
Without a fix
3
Exploited in attacks
0

Severity breakdown

  • Critical 2
  • High 8
  • Medium 14
  • Low 1

Disclosures per year

  1. 2018: 13
  2. 2019: 0
  3. 2020: 0
  4. 2021: 3
  5. 2022: 3
  6. 2023: 2
  7. 2024: 3
  8. 2025: 0
  9. 2026: 1
Severity:
  1. Improper Validation of Integrity Check Value in Bouncy Castle this entry
    Medium · 4.4 CVE-2018-5382 < 1.50 1.50
  2. High · 8.1 CVE-2020-28052 >= 1.65, < 1.67 1.67
  3. High · 7.5 CVE-2016-1000340 >= 1.51, < 1.56 1.56
  4. Critical · 9.8 CVE-2018-1000613 >= 1.57, < 1.60 1.60

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.