CVE-2018-5382
Bouncy Castle BKS-V1 keystore files vulnerable to trivial hash collisions
- Published
- Updated
- Reserved
- Assigned by
- certcc
Description
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.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| NVDNVD · Modified | 3.1 | Medium4.4 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N |
- EPSS (exploitation in 30 days)
- 0.26% · top 82% of all CVEs (4 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 4.4.
Weakness
Affected products
Legion of the Bouncy Castle · Bouncy Castle
- affected all – < 1.47
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Mavenorg.bouncycastle:bcprov-jdk15onGHSA-8477-3v39-ggpm (opens in a new tab)
References (5)
- 103453 (opens in a new tab)vdb-entryx_refsource_BIDx_transferred
- RHSA-2018:2927 (opens in a new tab)vendor-advisoryx_refsource_REDHATx_transferred
- VU#306792 (opens in a new tab)third-party-advisoryx_refsource_CERT-VNx_transferred
- https://www.bouncycastle.org/releasenotes.html (opens in a new tab)x_refsource_MISCx_transferred
- https://www.oracle.com/security-alerts/cpuoct2020.html (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-8477-3v39-ggpm (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2018-5382)Record last updated .