Executive brief
Bouncy Castle is a widely-used cryptography library that provides OpenPGP support for secure communications. A flaw in OpenPGP user-attribute subpacket handling allows an attacker to craft malicious PGP messages that consume unlimited memory on the processing system, potentially causing application crashes or denial of service.
Technical details
The vulnerability is a denial-of-service flaw in Bouncy Castle's OpenPGP implementation. The user-attribute subpacket length is bounded only by the JVM's maximum available memory, allowing an attacker to send a specially crafted OpenPGP message with an extremely large subpacket length value. This causes the library to attempt to allocate excessive memory when parsing the malformed packet, leading to out-of-memory errors and application termination. No authentication is required; the attack vector is network-based and exploitable by any user who can send PGP data to an affected application. The vulnerability affects Bouncy Castle for Java before 1.85, Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bcpg-fips 1.0.13, 2.0.13, and 2.1.13 respectively.
Affected products
- Bouncy Castle Bouncy Castle for Java before 1.85
- Bouncy Castle Bouncy Castle for Java LTS before 2.73.12
- Bouncy Castle Bouncy Castle for Java FIPS (bcpg-fips) before 1.0.13 (1.0.X), before 2.0.13 (2.0.X), before 2.1.13 (2.1.X)
Timeline
- 2026-08-03: disclosed: CVE-2026-59649 published