CVE-2026-63575: CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop') in Legion of the Bouncy Castle Inc. bc-csharp
Loop with unreachable exit condition in the PKCS#12 key derivation (Pkcs12ParametersGenerator) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows an attacker who can supply a PKCS#12 (PFX) file, or a PKCS#8 encrypted private key that uses a PKCS#12 password-based encryption algorithm, to cause a denial of service through CPU exhaustion via an iteration count of zero or below, because the derivation loop ran until its counter equalled the count, so for such a count it wrapped through about 2^32 iterations before the MAC or the password could be checked. A 75-byte PFX file with a negative MacData iteration count kept Pkcs12Store.Load busy for many minutes.
AI Analysis
Technical Summary
The vulnerability arises from the PKCS#12 key derivation implementation in bc-csharp before 2.7.0, where the iteration count parameter can be zero or negative. The derivation loop runs until its counter equals the iteration count, but with zero or negative values, the loop counter wraps around causing an extremely high number of iterations (~2^32). This results in excessive CPU consumption, effectively causing a denial of service when processing maliciously crafted PKCS#12 or PKCS#8 files. A 75-byte PFX file with a negative MacData iteration count was demonstrated to keep the Pkcs12Store.Load function busy for many minutes.
Potential Impact
An unauthenticated attacker who can supply a crafted PKCS#12 or PKCS#8 encrypted private key file can cause a denial of service by exhausting CPU resources during key derivation. This can disrupt applications relying on bc-csharp for cryptographic operations involving PKCS#12 files, potentially leading to service unavailability.
Mitigation Recommendations
A fix is available in bc-csharp version 2.7.0 and later. Users should upgrade to version 2.7.0 or newer to remediate this vulnerability. No other mitigation or temporary workaround is indicated in the provided data.
CVE-2026-63575: CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop') in Legion of the Bouncy Castle Inc. bc-csharp
Description
Loop with unreachable exit condition in the PKCS#12 key derivation (Pkcs12ParametersGenerator) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows an attacker who can supply a PKCS#12 (PFX) file, or a PKCS#8 encrypted private key that uses a PKCS#12 password-based encryption algorithm, to cause a denial of service through CPU exhaustion via an iteration count of zero or below, because the derivation loop ran until its counter equalled the count, so for such a count it wrapped through about 2^32 iterations before the MAC or the password could be checked. A 75-byte PFX file with a negative MacData iteration count kept Pkcs12Store.Load busy for many minutes.
CVSS v4.0
Score 7.1high
Affected software
Legion of the Bouncy Castle Inc.
bc-csharp
pkg:nuget/BouncyCastle.CryptographyRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises from the PKCS#12 key derivation implementation in bc-csharp before 2.7.0, where the iteration count parameter can be zero or negative. The derivation loop runs until its counter equals the iteration count, but with zero or negative values, the loop counter wraps around causing an extremely high number of iterations (~2^32). This results in excessive CPU consumption, effectively causing a denial of service when processing maliciously crafted PKCS#12 or PKCS#8 files. A 75-byte PFX file with a negative MacData iteration count was demonstrated to keep the Pkcs12Store.Load function busy for many minutes.
Potential Impact
An unauthenticated attacker who can supply a crafted PKCS#12 or PKCS#8 encrypted private key file can cause a denial of service by exhausting CPU resources during key derivation. This can disrupt applications relying on bc-csharp for cryptographic operations involving PKCS#12 files, potentially leading to service unavailability.
Mitigation Recommendations
A fix is available in bc-csharp version 2.7.0 and later. Users should upgrade to version 2.7.0 or newer to remediate this vulnerability. No other mitigation or temporary workaround is indicated in the provided data.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- bcorg
- Date Reserved
- 2026-07-16T23:50:45.118Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6abf5de7a43b0b3b8988eaaf
Added to database: 10/02/2026, 07:31:51 UTC
Last enriched: 10/02/2026, 07:46:17 UTC
Last updated: 10/02/2026, 21:45:56 UTC
Views: 16
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.