CVE-2025-8885: Bouncy Castle for Java on All (API modules) allows Excessive Allocation
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.
Published Aug 12, 2025 · Updated Sep 3, 2025
Affected packages
org.bouncycastle:bcprov-jdk14
- Ecosystem
- Maven
- Affected
- >= 1.0, < 1.78
- Fixed in
- 1.78
- Check
mvn dependency:tree -Dincludes=org.bouncycastle:bcprov-jdk14
org.bouncycastle:bcprov-jdk15to18
- Ecosystem
- Maven
- Affected
- >= 1.0, < 1.78
- Fixed in
- 1.78
- Check
mvn dependency:tree -Dincludes=org.bouncycastle:bcprov-jdk15to18
org.bouncycastle:bcprov-jdk18on
- Ecosystem
- Maven
- Affected
- >= 1.0, < 1.78
- Fixed in
- 1.78
- Check
mvn dependency:tree -Dincludes=org.bouncycastle:bcprov-jdk18on
org.bouncycastle:bctls-jdk14
- Ecosystem
- Maven
- Affected
- >= 1.0, < 1.78
- Fixed in
- 1.78
- Check
mvn dependency:tree -Dincludes=org.bouncycastle:bctls-jdk14
org.bouncycastle:bctls-jdk15to18
- Ecosystem
- Maven
- Affected
- >= 1.0, < 1.78
- Fixed in
- 1.78
- Check
mvn dependency:tree -Dincludes=org.bouncycastle:bctls-jdk15to18
org.bouncycastle:bctls-jdk18on
- Ecosystem
- Maven
- Affected
- >= 1.0, < 1.78
- Fixed in
- 1.78
- Check
mvn dependency:tree -Dincludes=org.bouncycastle:bctls-jdk18on
org.bouncycastle:bc-fips
- Ecosystem
- Maven
- Affected
- = 2.0.0
- Fixed in
- 2.0.1
- Check
mvn dependency:tree -Dincludes=org.bouncycastle:bc-fips
org.bouncycastle:bc-fips
- Ecosystem
- Maven
- Affected
- >= 1.0.0, < 1.0.2.6
- Fixed in
- 1.0.2.6
- Check
mvn dependency:tree -Dincludes=org.bouncycastle:bc-fips
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
Credited to xnox.
References
- https://nvd.nist.gov/vuln/detail/CVE-2025-8885
- https://github.com/bcgit/bc-java/wiki/CVE%E2%80%902025%E2%80%908885
- https://github.com/bcgit/bc-java/commit/3790993df5d28f661a64439a8664343437ed3865
- https://github.com/bcgit/bc-java/blob/main/core/src/main/java/org/bouncycastle/asn1/ASN1ObjectIdentifier.java
- https://github.com/advisories/GHSA-67mf-3cr5-8w23
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Maven vulnerabilities
All Maven entriesCVE-2026-13505
Bouncy Castle: Zeroisation of sensitive key material on garbage collection relies on finalization.
high8.7Aug 8, 2026CVE-2026-8798
Bouncy Castle: the native entropy source used on Intel platforms retried the CPU entropy instructions without any bound
high8.7Aug 8, 2026CVE-2026-13506
Bouncy Castle: Lazy ASN.1 sequence forcing resets nesting-depth guard
high7.5Aug 3, 2026CVE-2026-8763
Bouncy Castle: Name Constraints bypass via trailing dot in rfc822Name and URI
critical9.1Aug 3, 2026CVE-2025-14813
Bouncy Castle for Java GOST 28147 CTR mode reuses keystream after 255 blocks
critical7.5No fixApr 17, 2026CVE-2026-0636
Bouncy Castle has an LDAP injection
medium6.5Apr 17, 2026
