4.4med

CVE-2018-5382

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

Also known as GHSA-8477-3v39-ggpm

Published 8 y ago · modified 4 mo ago · JSON

CVSS
4.4
v3.1 · NVD
CISA KEV
No
not known exploited
EPSS
0.3%
percentile 18%
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.

Exploit prediction (EPSS)

0.26% probability of exploitation in the next 30 days, higher than 18% of all scored CVEs.

CVSS scores

Assigned byVersionScoreVector
NVD3.14.4CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
NVD2.03.6AV:L/AC:L/Au:N/C:P/I:P/A:N
GitHub3.14.4CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Affected packages

EcosystemPackageAffectedFixed in
mavenorg.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

  • securityfocus.com /bid/103453 · vdb-entry, x_refsource_BID, x_transferred
  • access.redhat.com /errata/RHSA-2018:2927 · vendor-advisory, x_refsource_REDHAT, x_transferred
  • kb.cert.org /vuls/id/306792 · third-party-advisory, x_refsource_CERT-VN, x_transferred
  • bouncycastle.org /releasenotes.html · x_refsource_MISC, x_transferred
  • oracle.com /security-alerts/cpuoct2020.html · x_refsource_MISC, x_transferred
  • nvd.nist.gov /vuln/detail/CVE-2018-5382 · advisory

Sources

vulnwire keeps one entry per vulnerability: the CVE id wins, then GHSA; records that alias each other are merged. Machine-readable: JSON.