{"id":"CVE-2018-5382","state":"PUBLISHED","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-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.","publishedAt":"2018-04-16T13:00:00.000Z","updatedAt":"2024-09-16T16:27:56.228Z","severity":null,"assigner":"certcc","products":["Legion of the Bouncy Castle Bouncy Castle"],"affected":[{"vendor":"Legion of the Bouncy Castle","product":"Bouncy Castle","versions":[{"version":"all","status":"affected","lessThan":"1.47","versionType":"custom"}]}],"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"],"weaknesses":["CWE-327"],"ingestedAt":"2026-10-29T19:44:56.034Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2018/5xxx/CVE-2018-5382.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2018-5382","state":"PUBLISHED","datePublished":"2018-04-16T13:00:00.000Z","dateUpdated":"2024-09-16T16:27:56.228Z","assignerShortName":"certcc","assignerOrgId":"37e5125f-f79b-445b-8fad-9564f167944b","dateReserved":"2018-01-12T00:00:00.000Z"},"containers":{"cna":{"title":"Bouncy Castle BKS-V1 keystore files vulnerable to trivial hash collisions","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Legion of the Bouncy Castle","product":"Bouncy Castle","versions":[{"version":"all","status":"affected","lessThan":"1.47","versionType":"custom"}]}],"references":[{"url":"http://www.securityfocus.com/bid/103453","name":"103453","tags":["vdb-entry","x_refsource_BID"]},{"url":"https://access.redhat.com/errata/RHSA-2018:2927","name":"RHSA-2018:2927","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://www.kb.cert.org/vuls/id/306792","name":"VU#306792","tags":["third-party-advisory","x_refsource_CERT-VN"]},{"url":"https://www.bouncycastle.org/releasenotes.html","tags":["x_refsource_MISC"]},{"url":"https://www.oracle.com/security-alerts/cpuoct2020.html","tags":["x_refsource_MISC"]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-327","description":"CWE-327: Use of a Broken or Risky Cryptographic Algorithm","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"certcc","dateUpdated":"2021-04-02T18:52:28.000Z","orgId":"37e5125f-f79b-445b-8fad-9564f167944b"},"datePublic":"2012-03-20T00:00:00.000Z","source":{"discovery":"UNKNOWN"},"x_legacyV4Record":{"CVE_data_meta":{"ASSIGNER":"cert@cert.org","DATE_PUBLIC":"2012-03-20T00:00:00.000Z","ID":"CVE-2018-5382","STATE":"PUBLIC","TITLE":"Bouncy Castle BKS-V1 keystore files vulnerable to trivial hash collisions"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"Bouncy Castle","version":{"version_data":[{"affected":"<","version_affected":"<","version_name":"all","version_value":"1.47"}]}}]},"vendor_name":"Legion of the Bouncy Castle"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-327: Use of a Broken or Risky Cryptographic Algorithm"}]}]},"references":{"reference_data":[{"name":"103453","refsource":"BID","url":"http://www.securityfocus.com/bid/103453"},{"name":"RHSA-2018:2927","refsource":"REDHAT","url":"https://access.redhat.com/errata/RHSA-2018:2927"},{"name":"VU#306792","refsource":"CERT-VN","url":"https://www.kb.cert.org/vuls/id/306792"},{"name":"https://www.bouncycastle.org/releasenotes.html","refsource":"MISC","url":"https://www.bouncycastle.org/releasenotes.html"},{"name":"https://www.oracle.com/security-alerts/cpuoct2020.html","refsource":"MISC","url":"https://www.oracle.com/security-alerts/cpuoct2020.html"}]},"source":{"discovery":"UNKNOWN"}}},"adp":[{"title":"CVE Program Container","references":[{"url":"http://www.securityfocus.com/bid/103453","name":"103453","tags":["vdb-entry","x_refsource_BID","x_transferred"]},{"url":"https://access.redhat.com/errata/RHSA-2018:2927","name":"RHSA-2018:2927","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred"]},{"url":"https://www.kb.cert.org/vuls/id/306792","name":"VU#306792","tags":["third-party-advisory","x_refsource_CERT-VN","x_transferred"]},{"url":"https://www.bouncycastle.org/releasenotes.html","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://www.oracle.com/security-alerts/cpuoct2020.html","tags":["x_refsource_MISC","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-05T05:33:44.404Z"}}]}}}