# CVE-2026-59651: Bouncycastle BKS keystore MAC key integrity bypass

Source: https://junglewise.ai/threats/cve-2026-59651-bouncycastle-bks-keystore-mac-key-integrity-bypass  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-03. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-59651 · Severity: high · CVSS 7.5 · Published 2026-08-03

Bouncycastle is a cryptographic library widely used in Java applications to secure sensitive data like encryption keys and certificates. This vulnerability allows an attacker to manipulate keystore files by bypassing the integrity check that protects them, potentially enabling theft or modification of stored credentials. Organizations relying on Bouncycastle for key management should upgrade immediately to prevent unauthorized access to critical secrets.

Technologies: [Bouncycastle Bouncy Castle For Java Lts](https://junglewise.ai/threats/technologies/bouncy-castle-for-java-lts). Vendors: [Bouncycastle](https://junglewise.ai/threats/vendors/bouncycastle).

## Quick answers

**Is CVE-2026-59651 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-59651 being exploited in the wild.

**How severe is CVE-2026-59651?** High severity, with a CVSS score of 7.5, published 3 August 2026.

**Which products and versions are affected?** Bouncycastle for Java before 1.85; Bouncycastle for Java LTS before 2.73.12.

**Is there a fix for CVE-2026-59651?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-59651 attacked?** It is attacked with local access.

**Am I affected by CVE-2026-59651?** Check whether you run Bouncycastle Bouncy Castle For Java Lts, Bouncycastle for Java or Bouncycastle for Java LTS at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The BKS (Bouncycastle Keystore) format in Bouncycastle for Java before version 1.85 and LTS before 2.73.12 accepts a legacy variant that uses only a 16-bit MAC key for integrity verification, significantly weakening the cryptographic integrity check. This allows an attacker with access to a keystore file to forge valid MACs without knowledge of the correct key, bypassing authentication mechanisms. The vulnerability is a cryptographic weakness in the keystore format handling rather than a network-based attack vector. An attacker must obtain the keystore file (via filesystem access, backup compromise, or network interception) to exploit this. Patches are available in version 1.85 and later for the regular library, and 2.73.12 and later for the LTS branch.

## Affected products

- Bouncycastle Bouncycastle for Java before 1.85
- Bouncycastle Bouncycastle for Java LTS before 2.73.12

## Timeline

- 2026-08-03: disclosed

## References

- [https://www.bouncycastle.org/download/bouncy-castle-java/](https://www.bouncycastle.org/download/bouncy-castle-java/)
- [https://www.bouncycastle.org/download/bouncy-castle-java-lts/](https://www.bouncycastle.org/download/bouncy-castle-java-lts/)

## Related threats

- [Bouncy Castle Java LTS native AES cipher key disclosure on array aliasing](https://junglewise.ai/threats/cve-2026-71883-in-bouncy-castle-for-java-lts-before-2-73-13-the-one-shot-native)
- [Bouncy Castle MTI/A0 DH agreement unvalidated peer value](https://junglewise.ai/threats/cve-2026-59650-bouncy-castle-mti-a0-dh-agreement-unvalidated-peer-value)
- [Bouncy Castle OpenPGP Argon2 S2K weak parameter validation](https://junglewise.ai/threats/cve-2026-59648-bouncy-castle-openpgp-argon2-s2k-weak-parameter-validation)
- [Bouncy Castle CMS AuthenticatedData MAC bypass with authAttrs](https://junglewise.ai/threats/cve-2026-59642-bouncy-castle-cms-authenticateddata-mac-bypass-with-authattrs)
- [Bouncy Castle for Java S/MIME signature validation time trust vulnerability](https://junglewise.ai/threats/cve-2026-59641-bouncy-castle-for-java-s-mime-signature-validation-time-trust)
