CVE-2025-8885
Bouncy Castle for Java on All (API modules) allows Excessive Allocation
Description
A resource allocation vulnerability exists in Bouncy Castle for Java (by Legion of the Bouncy Castle Inc.) that affects all API modules. The vulnerability allows attackers to cause excessive memory allocation through unbounded resource consumption, potentially leading to denial of service. The issue is located in the ASN1ObjectIdentifier.java file in the core module.
This issue affects Bouncy Castle for Java: from BC 1.0 through 1.77, from BC-FJA 1.0.0 through 2.0.0.
Affected Maven artifacts (7)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.bouncycastle » bc-fips | >= 1.0.0, < 1.0.2.6>= 2.0.0, < 2.0.1 | 1.0.2.6, 2.0.1 |
| org.bouncycastle » bcprov-jdk14 | >= 1.0, < 1.78 | 1.78 |
| org.bouncycastle » bcprov-jdk15to18 | >= 1.0, < 1.78 | 1.78 |
| org.bouncycastle » bcprov-jdk18on | >= 1.0, < 1.78 | 1.78 |
| org.bouncycastle » bctls-jdk14 | >= 1.0, < 1.78 | 1.78 |
| org.bouncycastle » bctls-jdk15to18 | >= 1.0, < 1.78 | 1.78 |
| org.bouncycastle » bctls-jdk18on | >= 1.0, < 1.78 | 1.78 |
Blast radius
37% of the dependent artifacts (5,365) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 24,456 |
| 2 hops | 105,945 |
| 3 hops | 132,376 |
| 4 hops | 177,462 |
| 5 hops | 122,561 |
| 6 hops | 47,620 |
Most used dependents
- org.apache.maven.plugins » maven-gpg-plugin50,913 usages
- org.apache.hadoop » hadoop-common3,482 usages
- org.apache.spark » spark-sql3,174 usages
- org.apache.spark » spark-core2,899 usages
- org.wso2.maven » carbon-p2-plugin2,864 usages
- com.android.tools.build » gradle2,197 usages
- org.bouncycastle » bcpkix-jdk18on2,109 usages
- org.apache.zookeeper » zookeeper2,044 usages
- org.apache.hadoop » hadoop-client1,796 usages
- org.wso2.carbon » org.wso2.carbon.core1,598 usages
- org.apache.kafka » kafka1,450 usages
- org.springframework.cloud » spring-cloud-starter-openfeign1,389 usages
- org.apache.hadoop » hadoop-mapreduce-client-core1,366 usages
- org.owasp » dependency-check-maven1,289 usages
- org.wso2.carbon » org.wso2.carbon.utils1,179 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
- Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2025-8885
- Webhttps://github.com/bcgit/bc-java/commit/3790993df5d28f661a64439a8664343437ed3865
- Packagehttps://github.com/bcgit/bc-java
- Webhttps://github.com/bcgit/bc-java/blob/main/core/src/main/java/org/bouncycastle/asn1/ASN1ObjectIdentifier.java
- Webhttps://github.com/bcgit/bc-java/wiki/CVE%E2%80%902025%E2%80%908885
