CVE-2026-63572 in bc-csharpinfo

Summary

by MITRE • 10/02/2026

Allocation of resources without limits in PKCS#12 keystore loading (Pkcs12Store.Load) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows an attacker who can supply a PKCS#12 (PFX) file to cause a denial of service through CPU exhaustion via an iteration count close to 2^31 in the file's MacData or in the PBE parameters of an encrypted SafeContents or shrouded key bag, because the counts are taken from the file without an upper bound and the key derivation runs before the MAC or the password can be checked. A zero or negative count is covered by CVE-2026-63575. Pkcs12Utilities.ConvertToDefiniteLength is also affected.

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. bc-csharp prior to version 2.7.0 represents a critical resource management flaw within the PKCS#12 keystore loading mechanism, specifically affecting the Pkcs12Store.Load and Pkcs12Utilities.ConvertToDefiniteLength methods. This issue stems from an allocation of resources without proper limits, allowing an attacker who can supply a maliciously crafted PKCS#12 (PFX) file to trigger a denial of service condition through CPU exhaustion. The core technical flaw lies in the library's handling of iteration counts found within the MacData section or the Password-Based Encryption parameters for encrypted SafeContents and shrouded key bags. When these files are processed, the software extracts the iteration count directly from the input data without enforcing an upper bound on its value.

The operational impact is severe because the cryptographic operations associated with high iteration counts are executed before any integrity verification or password validation takes place. In a typical secure implementation, authentication checks such as Message Authentication Code (MAC) verification should occur prior to expensive key derivation processes to prevent attackers from forcing the system to perform heavy computational work on unauthenticated data. However, in this vulnerable version of bc-csharp, the key derivation function runs immediately upon parsing the file structure. If an attacker provides a PKCS#12 file with an iteration count close to 2^31, the resulting CPU load can be sufficient to exhaust system resources, leading to service unavailability for legitimate users or causing the application process to hang indefinitely.

This vulnerability is categorized under CWE-400, which describes Uncontrolled Resource Consumption, as it allows a remote actor to consume excessive computational resources by manipulating input parameters that dictate processing intensity. Furthermore, from an offensive security perspective aligned with MITRE ATT&CK frameworks, this behavior facilitates Denial of Service via CPU exhaustion, often leveraging techniques associated with resource exhaustion attacks where the attacker exploits inefficient handling of cryptographic work factors. The issue is distinct yet related to CVE-2026-63575, which addresses cases where zero or negative iteration counts are provided, indicating a broader pattern of insufficient input validation regarding numeric parameters in this library's PKCS#12 implementation.

To mitigate this risk, organizations utilizing bc-csharp must upgrade immediately to version 2.7.0 or later, where the developers have implemented appropriate bounds checking for iteration counts during the loading process. Until an update is applied, defensive measures should include implementing strict input validation at the application layer to reject PKCS#12 files with unusually high iteration counts before they are passed to the cryptographic library. Additionally, deploying resource monitoring and rate-limiting mechanisms can help detect and mitigate potential denial of service attempts by identifying processes that consume disproportionate CPU time during certificate loading operations.

Responsible

Bcorg

Reservation

07/17/2026

Disclosure

10/02/2026

Moderation

accepted

EPSS

0.00330

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!