CVEfocus › CVE database › CVE-2018-5382

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

CVSS 4.4 MediumEPSS 0.3% (higher than 18% of CVEs)Published 2018-04-16Updated 2024-09-16Assigner: certcc

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.

CWE-327

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

4Fixed
2Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 16.04bouncycastleNot affected
vulnerable_code_not_present
Ubuntu 14.04bouncycastleNot affected
vulnerable_code_not_present
Debian 14bouncycastleFixed1.48+dfsg-2DEBIAN-CVE-2018-5382
Debian 13bouncycastleFixed1.48+dfsg-2DEBIAN-CVE-2018-5382
Debian 12bouncycastleFixed1.48+dfsg-2DEBIAN-CVE-2018-5382
Maven libraryorg.bouncycastle:bcprov-jdk15onFixed1.50GHSA-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.

Vendor advisories:

References

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.