CVE-2018-5382Bouncy Castle BKS-V1 keystore files vulnerable to trivial hash collisions
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.
What to do
Fixed builds are available from Debian, Maven: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 16.04 | bouncycastle | Not affected vulnerable_code_not_present | ||
| Ubuntu 14.04 | bouncycastle | Not affected vulnerable_code_not_present | ||
| Debian 14 | bouncycastle | Fixed | 1.48+dfsg-2 | DEBIAN-CVE-2018-5382 |
| Debian 13 | bouncycastle | Fixed | 1.48+dfsg-2 | DEBIAN-CVE-2018-5382 |
| Debian 12 | bouncycastle | Fixed | 1.48+dfsg-2 | DEBIAN-CVE-2018-5382 |
| Maven library | org.bouncycastle:bcprov-jdk15on | Fixed | 1.50 | GHSA-8477-3v39-ggpm |
What the vendor says
As published in the CVE record by certcc, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Legion of the Bouncy Castle Bouncy Castle: affected: all to before 1.47; fixed in
1.47
Vendor advisories:
- https://access.redhat.com/errata/RHSA-2018:2927 (vendor-advisory)
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
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.