CVE-2018-5382: Bouncy Castle BKS-V1 keystore files vulnerable to trivial hash collisions
Vulnerability summary
CVE-2018-5382 is a medium (CVSS 4.4) vulnerability in bouncycastle bc-java. EPSS estimates a 0.26% chance of exploitation in the next 30 days, higher than 18.9% of scored vulnerabilities.
Not severe (CVSS 4.4, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 1Timeline
- 16-04-2018PublishedVulnerability first disclosed.
- 16-09-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
7 scores · 5 sources · 3 versions- OSV · UbuntuEcosystem advisory · calculated4.4MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- OSV · DebianEcosystem advisory · calculated4.4MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- OSV · ChainguardEcosystem advisory · calculated4.4MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- OSV · MavenEcosystem advisory · calculated4.4MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
EPSS trend
Probability
0.26%
Chance of exploitation in the next 30 days
Percentile
19%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.26% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard3 products
- hadoop-fips-3.3.6All versions (No fix recorded)
- hadoop-fips-3.4.2All versions (No fix recorded)
- hadoop-fips-3.5All versions (No fix recorded)
Redhat2 products
Bouncycastle1 product
- bc-java≤ 1.49
Debian1 product
- bouncycastle< 1.48+dfsg-2
Legion of the bouncy castle1 product
- bouncy castle≥ all, < 1.47
Org.bouncycastle1 product
- bcprov-jdk15on< 1.50
Ubuntu1 product
- bouncycastle< 1.49+dfsg-2 | < 1.51-4ubuntu1
7 vendors · 10 products
References
10 links- access.redhat.com/errata/RHSA-2018:2927Vendor AdvisoryX Refsource REDHATThird Party AdvisoryAdvisoryWEB
- www.kb.cert.org/vuls/id/306792Third Party AdvisoryX Refsource CERT VNUS Government ResourceREPORTAdvisoryWEB