# CVE-2025-8916: Possible DOS in processing large name constraint structures in PKIXCertPathReveiwer

> Attackers can cause denial of service by triggering excessive memory allocation during the processing of large name constraint structures in the Bouncy Castle library.

- **Severity:** Medium 6.3 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/S:P/R:U/RE:M/U:Amber`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Aug 2025
- **Updated:** 12 May 2026
- **Also known as:** CLEANSTART-2026-LB17279, CLEANSTART-2026-VN09623, CLSA-2026-1770336550, CLSA-2026-1793133867, DEBIAN-CVE-2025-8916, ECHO-3e4c-cfff-062a, GHSA-4cx2-fc23-5wg6, MINI-2372-mhrr-mr2q, MINI-25h6-jrvh-v94r, MINI-396w-xqhh-fq8r, MINI-4625-wfqg-x3j3, MINI-5vmr-3h9m-q4cx, MINI-8pp8-wx59-9mwq, MINI-9m8f-v44c-7hxg, MINI-cjp7-jw85-mhf5, MINI-frr4-qfcf-xwhm, MINI-g2rf-93v8-6wjj, MINI-hqj4-x9rm-6fj5, MINI-hvrm-qjhx-6mfv, MINI-hwrg-g66m-rmhm, MINI-jwq8-mx8j-qr3p, MINI-qfcw-m8jh-5qvm, MINI-v238-86ch-rpfv, MINI-vrvg-7xxx-5963, MINI-vwpx-6c3p-fv2p, ROOT-APP-MAVEN-CVE-2025-8916, UBUNTU-CVE-2025-8916

## What is CVE-2025-8916?

CVE-2025-8916 is a medium-severity denial of service vulnerability in Legion of the Bouncy Castle Inc. BC Java, published on 13 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Allocation of Resources Without Limits or Throttling vulnerability in Legion of the Bouncy Castle Inc. BC Java bcpkix on All (API modules), Legion of the Bouncy Castle Inc. BC Java bcprov on All (API modules), Legion of the Bouncy Castle Inc. BCPKIX FIPS bcpkix-fips on All (API modules) allows Excessive Allocation. This vulnerability is associated with program files https://github.Com/bcgit/bc-java/blob/main/pkix/src/main/java/org/bouncycastle/pkix/jcajce/PKIXCertPathReviewer.Java, https://github.Com/bcgit/bc-java/blob/main/prov/src/main/java/org/bouncycastle/x509/PKIXCertPathReviewer.Java.

This issue affects BC Java: from 1.44 through 1.78; BC Java: from 1.44 through 1.78; BCPKIX FIPS: from 1.0.0 through 1.0.7, from 2.0.0 through 2.0.7.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling)

## Which versions are affected by CVE-2025-8916?

10 open source packages ship an affected version, including org.bouncycastle:bcpkix-fips, org.bouncycastle:bcpkix-jdk15on and org.bouncycastle:bcpkix-jdk15to18.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.bouncycastle:bcpkix-fips` | Maven | From 1.0.0 | 1.0.8 |
| `org.bouncycastle:bcpkix-fips` | Maven | From 1.0.0 | 1.0.8 |
| `org.bouncycastle:bcpkix-fips` | Maven | From 2.0.0 | 2.0.8 |
| `org.bouncycastle:bcpkix-fips` | Maven | From 2.0.0 | 2.0.8 |
| `org.bouncycastle:bcpkix-jdk15on` | Maven | From 1.44 | 1.79 |
| `org.bouncycastle:bcpkix-jdk15on` | Maven | From 1.44 | 1.79 |
| `org.bouncycastle:bcpkix-jdk15to18` | Maven | From 1.44 | 1.79 |
| `org.bouncycastle:bcpkix-jdk15to18` | Maven | From 1.44 | 1.79 |
| `org.bouncycastle:bcpkix-jdk18on` | Maven | From 1.44 | 1.79 |
| `org.bouncycastle:bcpkix-jdk18on` | Maven | From 1.44 | 1.79 |

## How do I fix CVE-2025-8916?

Upgrade org.bouncycastle:bcpkix-fips to a fixed version for your release line: 1.0.8 or 2.0.8.

## Is CVE-2025-8916 being exploited?

There is no known exploitation of CVE-2025-8916 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-8916 and fix it if it is affected.

What it is: CVE-2025-8916 is a medium-severity denial of service vulnerability in Legion of the Bouncy Castle Inc. BC Java, published on 13 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-8916 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.bouncycastle:bcpkix-fips (Maven): affected from 1.0.0; fixed in 1.0.8
- org.bouncycastle:bcpkix-fips (Maven): affected from 1.0.0; fixed in 1.0.8
- org.bouncycastle:bcpkix-fips (Maven): affected from 2.0.0; fixed in 2.0.8
- org.bouncycastle:bcpkix-fips (Maven): affected from 2.0.0; fixed in 2.0.8
- org.bouncycastle:bcpkix-jdk15on (Maven): affected from 1.44; fixed in 1.79
- org.bouncycastle:bcpkix-jdk15on (Maven): affected from 1.44; fixed in 1.79
- org.bouncycastle:bcpkix-jdk15to18 (Maven): affected from 1.44; fixed in 1.79
- org.bouncycastle:bcpkix-jdk15to18 (Maven): affected from 1.44; fixed in 1.79
- org.bouncycastle:bcpkix-jdk18on (Maven): affected from 1.44; fixed in 1.79
- org.bouncycastle:bcpkix-jdk18on (Maven): affected from 1.44; fixed in 1.79

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-8916/ (Markdown: https://insights.sbomify.com/CVE-2025-8916/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-8916
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-8916
- OSV: https://osv.dev/vulnerability/CVE-2025-8916

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-8916/
Summaries are generated and may contain mistakes; the official description above is the record.
