CVE-2026-59649 in BC-JAVA
Summary
by MITRE • 08/03/2026
In Bouncy Castle for Java before 1.85, OpenPGP user-attribute subpacket length bounded only by JVM max memory. This issue also affects Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bcpg-fips 1.0.13 (1.0.X series), 2.0.13 (2.0.X series) and 2.1.13 (2.1.X series).
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Analysis
by VulDB Data Team • 08/03/2026
The vulnerability in Bouncy Castle for Java represents a critical memory exhaustion issue that affects multiple versions of the cryptographic library across different product lines. This flaw stems from insufficient bounds checking on OpenPGP user-attribute subpacket length validation, allowing maliciously crafted packets to consume excessive memory resources. The vulnerability specifically impacts versions prior to 1.85 for standard Bouncy Castle Java, before 2.73.12 for the LTS variant, and various versions of BC-FJA including 1.0.13, 2.0.13, and 2.1.13 across their respective series. The root cause lies in the library's failure to properly validate the length field of OpenPGP user-attribute subpackets, which are used to store additional information about users such as email addresses, names, or other identifying attributes within PGP key structures.
The technical implementation of this vulnerability allows an attacker to construct malicious OpenPGP packets with excessively large length values in user-attribute subpackets, causing the Java Virtual Machine to attempt allocation of memory proportional to these invalid lengths. Since the bounds checking is only limited by the maximum available JVM memory rather than implementing proper validation constraints, an attacker can effectively exhaust system resources and potentially cause denial of service conditions. This type of vulnerability maps directly to CWE-129 Input Validation and Output Encoding, specifically focusing on insufficient validation of length fields in structured data formats. The impact extends beyond simple resource exhaustion as it can be leveraged to disrupt services that depend on Bouncy Castle for Java, particularly those handling OpenPGP operations such as email encryption systems, key management solutions, or any application processing PGP-formatted data.
From an operational perspective, this vulnerability creates significant risks for organizations relying on Bouncy Castle implementations, especially in environments where resource constraints are critical or where denial of service attacks could have severe consequences. The vulnerability affects both standard and FIPS-compliant versions of the library, indicating a fundamental flaw in the parsing logic that spans multiple security profiles and deployment scenarios. Attackers can exploit this by crafting specially formatted OpenPGP user-attribute packets that trigger memory allocation requests exceeding available system resources, potentially leading to application crashes, system instability, or complete service unavailability. The attack surface is particularly concerning for applications that process untrusted PGP data from external sources, such as email servers, key distribution services, or any system handling PGP keyrings from unknown parties.
Mitigation strategies should prioritize immediate upgrades to patched versions of Bouncy Castle Java, specifically version 1.85 and above for standard releases, 2.73.12 and later for LTS variants, and appropriate FIPS versions as specified in the advisory. Organizations should also implement defensive programming practices including input validation at multiple layers, memory monitoring for unusual allocation patterns, and rate limiting for OpenPGP packet processing. The vulnerability demonstrates the importance of proper bounds checking in cryptographic libraries and aligns with ATT&CK technique T1499.004 for resource exhaustion attacks, where adversaries exploit implementation weaknesses to consume system resources. Additionally, security teams should consider implementing network segmentation and monitoring for unusual memory consumption patterns in systems processing OpenPGP data, as this vulnerability may be used as part of broader attack campaigns targeting cryptographic infrastructure components that rely on Bouncy Castle implementations.