CVE-2026-13506 in Bouncy Castleinfo

Summary

by MITRE • 08/03/2026

In Bouncy Castle for Java before 1.85, Lazy ASN.1 sequence forcing resets nesting-depth guard. This issue also affects Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bc-fips 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series).

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 08/03/2026

The vulnerability in Bouncy Castle for Java represents a critical security flaw that affects multiple versions of the cryptographic library, specifically impacting the handling of ASN.1 sequence processing through improper management of nesting depth guards. This issue manifests when lazy evaluation of ASN.1 sequences triggers unexpected behavior in the internal depth tracking mechanisms, potentially leading to stack overflow conditions or other memory-related vulnerabilities that could be exploited by attackers. The vulnerability affects not only the standard Bouncy Castle implementation but also its long-term support and FIPS-certified variants, indicating a widespread impact across different deployment scenarios and security requirements.

The technical root cause of this vulnerability lies in how the library manages nested ASN.1 sequence structures during lazy evaluation processes. When ASN.1 sequences are processed lazily, the system maintains a depth counter to prevent excessive nesting that could lead to stack overflow conditions. However, the implementation fails to properly reset or validate this nesting depth guard when certain forcing operations occur, allowing maliciously crafted ASN.1 data to bypass normal depth restrictions and potentially cause denial of service through resource exhaustion. This flaw operates at the core of the cryptographic library's parsing mechanisms, making it particularly dangerous as it affects fundamental data processing operations.

The operational impact of this vulnerability extends beyond simple denial of service scenarios, as it can potentially enable more sophisticated attacks depending on how the affected systems utilize Bouncy Castle for Java. Applications that process untrusted ASN.1 data, including certificate validation, cryptographic protocol implementations, or any system handling PKI-related information, become vulnerable to exploitation. The vulnerability's presence in both standard and FIPS-certified versions means that organizations using these libraries for security-critical applications face significant risk, particularly those in regulated environments where FIPS compliance is mandatory. Attackers could potentially craft ASN.1 sequences designed to trigger the depth guard reset behavior, leading to system instability or complete service disruption.

Organizations should prioritize immediate remediation by upgrading to affected versions that have addressed this vulnerability, specifically targeting Bouncy Castle Java 1.85 and later, LTS versions 2.73.12 and later, and FIPS versions 1.0.2.7, 2.0.2, and 2.1.3 respectively. The mitigation strategy should include comprehensive testing of all applications that rely on Bouncy Castle for Java to ensure proper handling of ASN.1 sequences after upgrading. Additionally, implementing input validation measures and monitoring for unusual ASN.1 processing patterns can provide additional defense-in-depth layers. This vulnerability aligns with CWE-770, which addresses allocation of resources without limits or with inadequate limits, and may be leveraged by attackers following ATT&CK techniques related to resource exhaustion and denial of service operations.

Responsible

Bcorg

Reservation

06/28/2026

Disclosure

08/03/2026

Moderation

accepted

CPE

ready

EPSS

0.00263

KEV

no

Activities

low

Sources

Do you know our Splunk app?

Download it now for free!