{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2018-5382","id":"CVE-2018-5382","title":"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-V","descriptionLong":"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-16T13:00:00.000Z","updated":"2026-10-24T10:30:28.351587621Z","reserved":"2018-01-12T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"certcc","metric":{"version":"3.1","score":4.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":4.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":4.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":4.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N","rating":"medium","source":"GitHub"},{"version":"2.0","score":3.6,"vector":"AV:L/AC:L/Au:N/C:P/I:P/A:N","rating":"low","source":"NVD"}],"rating":"medium","products":["Legion of the Bouncy Castle Bouncy Castle"],"affectedProducts":[{"vendor":"Legion of the Bouncy Castle","product":"Bouncy Castle","defaultStatus":null,"versions":[{"lessThan":"1.47","status":"affected","version":"all","versionType":"custom"}],"platforms":[]}],"packages":[{"ecosystem":"Maven","name":"org.bouncycastle:bcprov-jdk15on","purl":"pkg:maven/org.bouncycastle/bcprov-jdk15on","ranges":["<1.50"],"fixed":["1.50"],"advisory":"GHSA-8477-3v39-ggpm"}],"cwes":["CWE-327","CWE-354"],"aliases":["GHSA-8477-3v39-ggpm"],"references":[{"url":"http://www.securityfocus.com/bid/103453","tags":["vdb-entry","x_refsource_BID","x_transferred","Third Party Advisory","VDB Entry","advisory","web"]},{"url":"https://access.redhat.com/errata/RHSA-2018:2927","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://www.kb.cert.org/vuls/id/306792","tags":["third-party-advisory","x_refsource_CERT-VN","x_transferred","Third Party Advisory","US Government Resource","advisory","web"]},{"url":"https://www.bouncycastle.org/releasenotes.html","tags":["x_refsource_MISC","x_transferred","Release Notes","Vendor Advisory","advisory","web"]},{"url":"https://www.oracle.com/security-alerts/cpuoct2020.html","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-5382","tags":["advisory"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.0026,"epssPercentile":0.17953,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2018-5382","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2018-5382","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2018-5382","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-8477-3v39-ggpm","ok":true,"note":"GHSA-8477-3v39-ggpm"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2018-5382","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}