CVE-2018-5382 | Bouncy 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.

Published: 2018-04-16 Last update: 2025-05-12 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2018-5382 is rated Low Risk (23.8/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.26%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2018-5382

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.15% 0.26% +0.11%
2 2026-03-04 0.03% 0.15% +0.12%
3 2026-03-01 0.03%

Full EPSS history (41 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2018-5382

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
4.4 3.1 MEDIUM
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
1.8 2.5 [email protected]
3.6 2.0 LOW
AV:L/AC:L/Au:N/C:P/I:P/A:N Click to expand
Access vector (AV:L)
Requires local access to the target system.
Access complexity (AC:L)
Exploitation conditions are straightforward and predictable.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:N)
No availability impact.
3.9 4.9 [email protected]

Weakness enumeration for CVE-2018-5382

GitHub Security Advisory for CVE-2018-5382

GHSA-8477-3v39-ggpm · Severity: medium · Ecosystem: maven — Improper Validation of Integrity Check Value in Bouncy Castle

OS Trackers for CVE-2018-5382

vendor priority summary link
debian not yet assigned CVE-2018-5382 not yet assigned priority: Debian including 1 source packages (bouncycastle), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2018-5382
redhat low https://access.redhat.com/security/cve/CVE-2018-5382
ubuntu medium CVE-2018-5382 medium priority: Ubuntu including 1 source packages (bouncycastle), 4 status rows across 4 suites (artful, trusty, upstream, xenial): not-affected 2, DNE 1, released 1. https://ubuntu.com/security/CVE-2018-5382

Affected software / configurations for CVE-2018-5382

Vendor Product Version Raw CPE
bouncycastle bc-java <= 1.49 cpe:2.3:a:bouncycastle:bc-java:*:*:*:*:*:*:*:*
redhat satellite 6.4 cpe:2.3:a:redhat:satellite:6.4:*:*:*:*:*:*:*
redhat satellite_capsule 6.4 cpe:2.3:a:redhat:satellite_capsule:6.4:*:*:*:*:*:*:*

References for CVE-2018-5382

URL Tags
http://www.securityfocus.com/bid/103453 Third Party Advisory VDB Entry
https://access.redhat.com/errata/RHSA-2018:2927 Third Party Advisory
https://www.bouncycastle.org/releasenotes.html Release Notes Vendor Advisory
https://www.kb.cert.org/vuls/id/306792 Third Party Advisory US Government Resource
https://www.oracle.com/security-alerts/cpuoct2020.html Third Party Advisory
cvelogic Threat Intelligence