CVE-2026-8798 Native entropy source retries the CPU entropy instructions without limit
An attacker can cause a denial of service by triggering infinite loops in the native entropy source when CPU instructions fail, affecting Bouncy Castle FIPS Java users.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-8798?
CVE-2026-8798 is a high-severity denial of service vulnerability in Legion of the Bouncy Castle Inc. BC-FJA, published on 8 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
In Bouncy Castle for Java FIPS (BC-FJA) before bc-fips 2.1.3, the native entropy source used on Intel platforms retried the CPU entropy instructions without any bound. RDSEED and RDRAND report failure through their carry flag, and the JNI seeding routine spun re-issuing the instruction for as long as that flag stayed clear, so a persistent failure of the on-chip entropy source - whether from a hardware fault, from the underlying DRBG being exhausted by contention across many cores, or from a hypervisor that does not provide the instruction - left the calling thread looping indefinitely inside the JNI call, where it could be neither interrupted nor timed out. Any operation drawing from the native entropy source could therefore hang, denying service to the application. The retry loops are now bounded (200 attempts for RDSEED and 20 for RDRAND, twice the baselines given in Intel's Digital Random Number Generator software implementation guide), pausing between attempts and, on exhaustion, clearing any partially written buffer and throwing rather than continuing to spin. The clear is performed by an un-elidable memzero, which uses a volatile pointer and an assembly memory barrier so that a compiler cannot optimise the erase away as a dead store. Bouncy Castle for Java (bcprov) is not affected, as it has no native entropy source; the 1.0.X and 2.0.X FIPS series are not affected.
Weakness: CWE-835
Which versions are affected by CVE-2026-8798?
2 open source packages ship an affected version, including org.bouncycastle:bc-fips.
| Package | Affected | Fixed in |
|---|---|---|
org.bouncycastle:bc-fips Maven | From 2.1.0 | 2.1.3 |
org.bouncycastle:bc-fips Maven | From 2.1.0 | 2.1.3 |
How do I fix CVE-2026-8798?
Upgrade org.bouncycastle:bc-fips to 2.1.3 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-8798 being exploited?
There is no known exploitation of CVE-2026-8798 in the wild and no public exploit code.
Sources
Also known as CLEANSTART-2026-AF46359, ECHO-31b5-6793-607b, GHSA-v6w3-qrh8-qccc, MINI-3h75-p36f-9grj, MINI-hj3q-9mxq-pmcr, MINI-q2vp-vx34-j7xc and 3 more.