LiveActive security incident?Get immediate response
CVE Record

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.

UnknownCVSS not scoredNot KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2018-5382 affects legacy Bouncy Castle BKS keystore files whose integrity check used only a 16-bit HMAC. If an attacker can tamper with such a keystore, the weak integrity check may fail to detect it. This is mainly a legacy keystore hygiene issue, not a broadly confirmed active-exploitation event.

Executive priority

Treat this as a focused legacy cryptography remediation. Prioritize systems where BKS keystores protect production credentials, TLS trust, signing keys, or mobile application trust stores. It is not proven actively exploited in the supplied sources, but weak keystore integrity can undermine sensitive trust decisions.

Technical view

Bouncy Castle BKS keystores generated before BC 1.47 used a 16-bit HMAC for file integrity, creating trivial collision risk and weakening keystore tamper detection. BC 1.47 changed BKS to use a 160-bit HMAC. BC 1.49 introduced BKS-V1 for legacy compatibility, but the authors discourage its use except where safe.

Likely exposure

Exposure is most likely in Java or Android systems using Bouncy Castle BKS keystores created before version 1.47, or systems explicitly using the legacy BKS-V1 keystore type. Downstream packaged products may also be relevant where vendor advisories apply.

Exploitation context

The supplied sources do not show CISA KEV listing or active exploitation. Practical risk depends on whether an attacker can access and modify the keystore file and whether the application trusts that keystore for sensitive identity, TLS, signing, or encryption decisions.

Researcher notes

The source bundle lacks CVSS scoring and exploit evidence. The strongest facts are the 16-bit HMAC weakness, the BC 1.47 format change to 160-bit HMAC, and the discouraged BKS-V1 compatibility path. Scope validation should be asset-specific, especially for old keystore files.

Mitigation direction

  • Inventory BKS keystores and identify files created before Bouncy Castle 1.47.
  • Recreate or migrate legacy BKS keystores to the current BKS format.
  • Avoid BKS-V1 unless a documented legacy constraint requires it.
  • Update Bouncy Castle and vendor packages per applicable advisories.
  • Check Red Hat, Oracle, and Bouncy Castle guidance for affected deployments.

Validation and detection

  • Search application configuration for explicit BKS-V1 keystore usage.
  • Confirm runtime Bouncy Castle versions and packaged dependency versions.
  • Identify BKS keystores generated before Bouncy Castle 1.47.
  • Verify migrated keystores load correctly in staging before production rollout.
  • Document any unavoidable BKS-V1 usage and compensating controls.
Prepared
Confidence
medium
Sources
6

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-327: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2018-5382 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Unknown
CVSS
Not scored
Known Exploited
No
Published
Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

0CVSS vectors
0Timeline events
0ADP providers
5Source links

CVSS and timeline data

No CVSS vectors or timeline events were available in the normalized CVE source material.

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
Legion of the Bouncy CastleBouncy CastleallListed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-327 · source CWE mapping

Use of a Broken or Risky Cryptographic Algorithm

Use of a Broken or Risky Cryptographic Algorithm represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.