CVE-2018-5382

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

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.

Categories

4.4
CVSS
Severity: Medium
CVSS 3.1 •
CVSS 2.0 •
EPSS 0.19%
Vendor Advisory redhat.com Vendor Advisory bouncycastle.org
Affected: Legion of the Bouncy Castle Bouncy Castle
Published at:
Updated at:

References

Link Tags
http://www.securityfocus.com/bid/103453 third party advisory vdb entry
https://access.redhat.com/errata/RHSA-2018:2927 third party advisory vendor advisory
https://www.kb.cert.org/vuls/id/306792 third party advisory us government resource
https://www.bouncycastle.org/releasenotes.html release notes vendor advisory
https://www.oracle.com/security-alerts/cpuoct2020.html third party advisory

Frequently Asked Questions

What is the severity of CVE-2018-5382?
CVE-2018-5382 has been scored as a medium severity vulnerability.
How to fix CVE-2018-5382?
To fix CVE-2018-5382, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2018-5382 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2018-5382 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2018-5382?
CVE-2018-5382 affects Legion of the Bouncy Castle Bouncy Castle.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.