# CVE-2026-3505: Bouncy Castle BC-JAVA resource exhaustion in PGP AEAD processing

Source: https://junglewise.ai/threats/cve-2026-3505-bouncy-castle-bc-java-resource-exhaustion-in-pgp-aead-processing  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-15. Updated: 2026-05-19  
License: CC BY 4.0 with a link back

CVE-2026-3505 · Severity: high · CVSS 4 · Published 2026-04-15

Bouncy Castle Java (BC-JAVA) is a widely used library for encryption and secure communications. A vulnerability in its PGP module allows an attacker to send a specially crafted message that causes the application to consume excessive memory. This can lead to a complete service outage (Denial of Service) by crashing the Java Virtual Machine before the user is even authenticated.

Vendors: [Legion of the Bouncy Castle](https://junglewise.ai/threats/vendors/legion-of-the-bouncy-castle), [Maven](https://junglewise.ai/threats/vendors/maven).

## Quick answers

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

**How severe is CVE-2026-3505?** High severity, with a CVSS score of 4, published 15 April 2026.

**Which products and versions are affected?** Legion of the Bouncy Castle Java OpenPGP API 1.74 to 1.80.1, 1.81, 1.82 to 1.83; org.bouncycastle:bcpg-jdk12 (Maven) <= 130, ECOSYSTEM:introduced=0,last_affected=130; org.bouncycastle:bcpg-jdk14 (Maven) < 1.84, ECOSYSTEM:introduced=0,fixed=1.84; org.bouncycastle:bcpg-jdk15 (Maven) <= 1.46, ECOSYSTEM:introduced=0,last_affected=1.46; and 4 more.

**Is there a fix for CVE-2026-3505?** Yes. org.bouncycastle:bcpg-jdk14 (Maven): upgrade to 1.84 or later; org.bouncycastle:bcpg-jdk15to18 (Maven): upgrade to 1.84 or later; org.bouncycastle:bcpg-jdk18on (Maven): upgrade to 1.84 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

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

**Am I affected by CVE-2026-3505?** Check whether you run Legion of the Bouncy Castle Java OpenPGP API, org.bouncycastle:bcpg-jdk12 (Maven), org.bouncycastle:bcpg-jdk14 (Maven) or one of the others listed 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:bcpg-jdk14 (Maven): upgrade to 1.84 or later

  ```sh
  # set org.bouncycastle:bcpg-jdk14 to 1.84 in your pom.xml or build.gradle
  ```

- org.bouncycastle:bcpg-jdk15to18 (Maven): upgrade to 1.84 or later

  ```sh
  # set org.bouncycastle:bcpg-jdk15to18 to 1.84 in your pom.xml or build.gradle
  ```

- org.bouncycastle:bcpg-jdk18on (Maven): upgrade to 1.84 or later

  ```sh
  # set org.bouncycastle:bcpg-jdk18on to 1.84 in your pom.xml or build.gradle
  ```


## Technical details

An uncontrolled resource consumption vulnerability exists in the Bouncy Castle Java (BC-JAVA) OpenPGP (bcpg) module. The root cause is a lack of validation for the 'chunkSize' field within AEAD-encrypted data packets (AEADEncDataPacket.java). A remote, unauthenticated attacker can provide a crafted AEAD chunk header with an unbounded or extremely large chunk size, leading to memory exhaustion and a crash of the Java Virtual Machine (JVM). This occurs during the initial packet parsing phase, making it a pre-authentication attack. The issue is fixed in versions 1.80.2, 1.81.1, and 1.84 by enforcing RFC 9580 limits on the chunkSize (0-16).

## Affected products

- Legion of the Bouncy Castle Inc. BC-JAVA bcpg 1.74 to 1.80.1, 1.81, 1.82 to 1.83

## Identifiers

- CVE-2026-3505
- GHSA-cj8j-37rh-8475

## Timeline

- 2026-03-04: patched: Fix committed to repository
- 2026-04-15: advisory: Initial NVD publication
- 2026-05-18: other: Advisory updated with specific version ranges and technical details

## References

- [https://github.com/bcgit/bc-java/commit/dc7530939ffb6cdb57636f3609d98e23b94e71c1](https://github.com/bcgit/bc-java/commit/dc7530939ffb6cdb57636f3609d98e23b94e71c1)
- [https://github.com/bcgit/bc-java/wiki/CVE%E2%80%902026%E2%80%903505](https://github.com/bcgit/bc-java/wiki/CVE%E2%80%902026%E2%80%903505)
