CVE-2026-63566 in bc-csharpinfo

Summary

by MITRE • 10/02/2026

Memory allocation with excessive size value in the DTLS handshake reassembly (DtlsReliableHandshake, DtlsReassembler) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows a remote unauthenticated DTLS peer to cause a denial of service through memory exhaustion via crafted handshake message fragments, because the reassembly buffer for each incoming handshake message was allocated at the 24-bit length declared in the fragment header, without the check against the peer's maximum handshake message size that TLS already applied. A fragment carrying no payload can force an allocation of almost 16 MB, for each of up to 16 pending messages per handshake, before the handshake is authenticated. DTLS servers and DTLS clients are both affected; TLS is not.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 10/02/2026

The vulnerability identified in Legion of the Bouncy Castle Inc.'s bc-csharp library prior to version 2.7.0 represents a critical implementation flaw within the Datagram Transport Layer Security (DTLS) handshake reassembly logic, specifically affecting the DtlsReliableHandshake and DtlsReassembler components. This security defect allows for a remote unauthenticated denial of service attack by exploiting how memory is allocated during the processing of incoming DTLS handshake fragments. The core issue stems from a discrepancy in validation procedures between TLS and DTLS implementations within this library, where the system fails to enforce maximum message size constraints before committing significant resources to buffer allocation.

Technically, the flaw resides in the mechanism used to prepare buffers for reassembling fragmented handshake messages. When a peer sends a DTLS handshake fragment, the protocol header includes a length field that specifies the total size of the complete message being reconstructed. In this vulnerable implementation, the software allocates memory for the reassembly buffer based directly on this 24-bit length value declared in the fragment header. Crucially, the code omits a preliminary check against the peer's advertised maximum handshake message size, which is a standard security practice employed by TLS implementations to prevent such resource exhaustion attacks. By trusting the length field without validating it against established limits or context-specific constraints, the application blindly reserves memory space that may be vastly larger than what is reasonable for a single handshake component.

The operational impact of this vulnerability is severe due to its potential for rapid and massive memory consumption by an unauthenticated attacker. A malicious peer can craft specific DTLS fragments with no actual payload data but with length fields set to near-maximum values, effectively forcing the server or client to allocate approximately 16 megabytes of memory per fragment. Since a single handshake process may have up to sixteen pending messages in various states of reassembly simultaneously, an attacker can trigger allocations totaling over two hundred and fifty megabytes of RAM before any cryptographic authentication occurs. This pre-authentication exploitation means that the attack does not require valid credentials or successful key exchange, making it highly accessible for denial-of-service campaigns targeting DTLS-enabled services such as CoAP implementations, IoT devices, and secure communication endpoints relying on this library.

From a classification perspective, this vulnerability aligns with CWE-400, which describes uncontrolled resource consumption, specifically manifesting as memory exhaustion through improper validation of input size parameters. It also maps to the MITRE ATT&CK technique T1498, Network Denial of Service, particularly under sub-techniques involving resource exhaustion via protocol abuse. The attack vector is remote and requires no authentication, placing it at a high severity level within standard vulnerability scoring frameworks due to its ease of exploitation and significant impact on system availability.

Mitigation for this issue involves upgrading the bc-csharp library to version 2.7.0 or later, where the developers have implemented proper validation checks that align with TLS standards by verifying handshake message sizes against peer limits before buffer allocation. For organizations unable to immediately patch their systems, defensive measures include deploying network-level rate limiting on DTLS traffic and configuring host-side memory constraints such as cgroups in Linux environments to limit the maximum memory footprint of individual processes. Additionally, implementing strict input validation at the application gateway level can help filter out malformed or excessively large handshake fragments before they reach the vulnerable library components, thereby reducing the attack surface until a permanent code fix is deployed.

Responsible

Bcorg

Reservation

07/17/2026

Disclosure

10/02/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!