# CVE-2026-8798: Bouncy Castle Java FIPS infinite loop in entropy source on Intel platforms

Source: https://junglewise.ai/threats/cve-2026-8798-bouncy-castle-java-fips-infinite-loop-in-entropy-source-on-intel  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-08. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-8798 · Severity: high · CVSS 4 · Published 2026-08-08

Bouncy Castle for Java FIPS is a widely-used cryptographic library that includes a native entropy source for random number generation on Intel processors. A flaw in this entropy source can cause the application to hang indefinitely when accessing random numbers, whether due to hardware failure, resource exhaustion, or virtualization issues. This denial of service affects any application relying on Bouncy Castle's entropy generation, potentially disrupting critical services.

Technologies: [org.bouncycastle:bc-fips (Maven)](https://junglewise.ai/threats/technologies/org-bouncycastle-bc-fips). Vendors: [Maven](https://junglewise.ai/threats/vendors/maven).

## Quick answers

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

**How severe is CVE-2026-8798?** High severity, with a CVSS score of 4, published 8 August 2026.

**Which products and versions are affected?** org.bouncycastle:bc-fips (Maven) >= 2.1.0, < 2.1.3, ECOSYSTEM:introduced=2.1.0,fixed=2.1.3.

**Is there a fix for CVE-2026-8798?** Yes. org.bouncycastle:bc-fips (Maven): upgrade to 2.1.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-8798 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-8798?** Check whether you run org.bouncycastle:bc-fips (Maven) 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.

## How to fix

- org.bouncycastle:bc-fips (Maven): upgrade to 2.1.3 or later

  ```sh
  # set org.bouncycastle:bc-fips to 2.1.3 in your pom.xml or build.gradle
  ```


## Technical details

The vulnerability is an infinite loop (CWE-835) in the JNI native entropy source used on Intel platforms. The seeding routine calls the RDSEED and RDRAND CPU instructions without any bound on retry attempts; when these instructions fail (signaled via carry flag), the code re-issued them indefinitely rather than timing out or throwing an exception. This could occur due to hardware faults, DRBG exhaustion from high contention, or hypervisors that don't support the instructions. The attack vector is network-accessible since any remote operation triggering entropy generation can hang the application thread. The vulnerability affects bc-fips versions 2.1.0 through 2.1.2; it is fixed in version 2.1.3 which bounds retries (200 for RDSEED, 20 for RDRAND) and throws on exhaustion.

## Affected products

- Bouncy Castle bc-fips 2.1.0 through 2.1.2

## Identifiers

- CVE-2026-8798
- GHSA-v6w3-qrh8-qccc

## Timeline

- 2026-08-08: disclosed
- 2026-08-08: patched: Fix released in bc-fips 2.1.3

## Related threats

- [Bouncy Castle FIPS sensitive key material zeroisation failure](https://junglewise.ai/threats/cve-2026-13505-bouncy-castle-fips-sensitive-key-material-zeroisation-failure)
- [Bouncy Castle ASN.1 sequence nesting-depth guard bypass](https://junglewise.ai/threats/cve-2026-13506-bouncy-castle-asn-1-sequence-nesting-depth-guard-bypass)
- [Bouncy Castle Name Constraints bypass via trailing dot in rfc822Name and URI](https://junglewise.ai/threats/cve-2026-8763-bouncy-castle-name-constraints-bypass-via-trailing-dot-in)
- [Bouncy Castle BC-LTS GCM decryption failure on X86_64 Linux](https://junglewise.ai/threats/cve-2026-8149-bouncy-castle-bc-lts-gcm-decryption-failure-on-x86-64-linux)
- [Uncontrolled Resource Consumption vulnerability in Legion of the Bouncy Castle Inc. Bouncy Castle for Java FIPS bc-fips on All (API modules)](https://junglewise.ai/threats/cve-2025-12194-bouncy-castle-vulnerable-to-uncontrolled-resource-consumption)
