Skip to content
Fencer Vulns
medium 4.4

CVE-2018-5382 json

Bouncy Castle BKS-V1 keystore files vulnerable to trivial hash collisions

published 2018-04-16 8 y ago modified 2026-06-17 4 mo ago also GHSA-8477-3v39-ggpm , EUVD-2022-3099

cvss
4.4
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
0.3%
EPSS 0.3% chance of exploitation in 30 days, percentile 17%
public exploits
0
none known

Summary

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.

Patch / fix

  • maven org.bouncycastle:bcprov-jdk15on 1.50
  • Legion of the Bouncy Castle Bouncy Castle 1.47
  • bouncycastle Debian 14, Debian 13, Debian 12 1.48+dfsg-2

debian advisories DEBIAN-CVE-2018-5382

  • v8 satellite capsule 6.4 1:3.14.5.10-19.el7sat
  • tfm satellite capsule 6.4, satellite 6.4 4.0-3.el7sat
  • kobo satellite capsule 6.4, satellite 6.4 0.5.1-1.el7sat
  • pulp satellite capsule 6.4, satellite 6.4 2.16.4.1-1.el7sat
  • gofer satellite capsule 6.4, satellite 6.4 2.12.1-1.el7sat
  • ostree satellite capsule 6.4, satellite 6.4 2017.1-2.atomic.el7
  • SOAPpy satellite capsule 6.4, satellite 6.4 0.11.6-17.el7
  • foreman satellite capsule 6.4, satellite 6.4 1.18.0.37-1.el7sat

red hat advisories RHSA-2018:2927

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2018-5382 updated cvss 5.1

bouncycastle: BKS-V1 keystore files vulnerable to trivial hash collisions

  • Red Hat JBoss Data Virtualization 6 bouncycastle bouncycastle
    affected: no fix planned “Out of support scope”
  • Red Hat JBoss Enterprise Application Platform 7 bouncycastle bouncycastle
    affected: no fix available
  • Red Hat Subscription Asset Manager bouncycastle
    affected: no fix planned “Will not fix”
  • Red Hat streams for Apache Kafka bouncycastle bouncycastle
    affected: no fix available “Fix deferred”
  • Red Hat Satellite 6.4 tfm 4.0-3.el7sat, kobo 0.5.1-1.el7sat, SOAPpy 0.11.6-17.el7, candlepin 2.4.8-1.el7, gofer 2.12.1-1.el7sat, liquibase 3.1.0-1.el7, +383 more Red Hat Satellite Capsule 6.4 tfm 4.0-3.el7sat, kobo 0.5.1-1.el7sat, SOAPpy 0.11.6-17.el7, gofer 2.12.1-1.el7sat, katello 3.7.0-8.el7sat, pulp 2.16.4.1-1.el7sat, +217 more
    fixed: vendor fix RHSA-2018:2927
  • Red Hat Software Collections rh-eclipse46-bouncycastle, rh-eclipse46-bouncycastle-javadoc Red Hat Virtualization 4 eap7-bouncycastle
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

0.26% chance of exploitation in the next 30 days, higher than 17% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
NVD 3.1 4.4 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
NVD 2.0 3.6 AV:L/AC:L/Au:N/C:P/I:P/A:N
GitHub 3.1 4.4 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Affected packages

ecosystem package affected fixed in
maven org.bouncycastle:bcprov-jdk15on
<1.50
1.50

Affected products

  • Legion of the Bouncy Castle Bouncy Castle

Classification

Weakness
  • CWE-327 Use of a Broken or Risky Cryptographic Algorithm
  • CWE-354 Improper Validation of Integrity Check Value

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.