# CVE-2018-5382: Bouncy Castle BKS-V1 keystore files vulnerable to trivial hash collisions

- Priority: **Routine**
- Reason: Not severe (CVSS 4.4, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2018-04-16 · Modified: 2024-09-16
- Aliases: UBUNTU-CVE-2018-5382, DEBIAN-CVE-2018-5382, CGA-252f-f9r9-p7r8, CGA-f4pr-hp23-vmxq, CGA-pqpx-2hpx-xr44, GHSA-8477-3v39-ggpm, CGA-q3pq-78h3-gx6g, CGA-whwr-gh5r-593j, CGA-xhm9-pjg4-w75j
- Record: https://cvemate.com/vulnerability/CVE-2018-5382 · JSON: https://cvemate.com/vulnerability/CVE-2018-5382/json

## Description

```text
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.
```

## Signals

- CVSS: 4.4 medium (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- EPSS: 0.26%, percentile 18.936%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- chainguard hadoop-fips-3.3.6 (Chainguard): All versions (No fix recorded)
- chainguard hadoop-fips-3.4.2 (Chainguard): All versions (No fix recorded)
- chainguard hadoop-fips-3.5 (Chainguard): All versions (No fix recorded)
- bouncycastle bc-java: ≤ 1.49
- debian bouncycastle (Debian): \< 1.48+dfsg-2
- ubuntu bouncycastle (Ubuntu): \< 1.49+dfsg-2 \| \< 1.51-4ubuntu1
- legion of the bouncy castle bouncy castle: ≥ all, \< 1.47
- org.bouncycastle bcprov-jdk15on (Maven): \< 1.50
- redhat satellite: 6.4
- redhat satellite\_capsule: 6.4

## References

- <http://www.securityfocus.com/bid/103453>
- <https://access.redhat.com/errata/RHSA-2018:2927>
- <https://www.kb.cert.org/vuls/id/306792>
- <https://www.bouncycastle.org/releasenotes.html>
- <https://www.oracle.com/security-alerts/cpuoct2020.html>
- <https://ubuntu.com/security/CVE-2018-5382>
- <https://insights.sei.cmu.edu/cert/2018/03/the-curious-case-of-the-bouncy-castle-bks-passwords.html>
- <https://www.cve.org/CVERecord?id=CVE-2018-5382>
- <https://security-tracker.debian.org/tracker/CVE-2018-5382>
- <https://nvd.nist.gov/vuln/detail/CVE-2018-5382>

---

Data as of 2026-12-05T09:18:44.729Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
