Skip to main content

Bouncy Castle bc-csharp EUVDEUVD-2026-91226

| CVE-2026-63575 HIGH
Loop with Unreachable Exit Condition (Infinite Loop) (CWE-835)
2026-10-02 bcorg GHSA-7c84-x75c-5j8m
7.1
CVSS 4.0 · Vendor: bcorg
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply crafted PKCS#12 PFX or PKCS#8 key
  2. Delivery
    Application invokes Pkcs12Store.Load / key derivation
  3. Exploit
    Negative iteration count skips loop exit
  4. Execution
    Derivation wraps ~2^32 iterations
  5. Impact
    CPU exhaustion denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Loop termination conditions
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The victim application must call Bouncy Castle bc-csharp (before 2.7.0) code paths that process attacker-controlled input through Pkcs12ParametersGenerator - specifically loading a PKCS#12/PFX file (e.g. Pkcs12Store.Load) or decrypting a PKCS#8 private key that uses a PKCS#12 password-based encryption algorithm. The specific trigger is a MacData (or PBE) iteration count of zero or a negative value, which causes the derivation loop to wrap through ~2^32 iterations before any MAC/password validation. Key LIMITING factors: exploitation requires the application to actually accept and parse untrusted PFX/PKCS#8 data (UI:P / user-interaction-dependent), and impact is confined to CPU/availability exhaustion - there is no code execution, data disclosure, or integrity loss. Services that only process trusted, internally-generated keystores are not realistically exposed.

Impact

This is a genuine but bounded availability risk, not a high-severity critical. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H) scores 7.1 driven entirely by availability impact (VA:H) with zero confidentiality or integrity effect - consistent with a CWE-835 unbounded-loop DoS. The vector requires passive user interaction (UI:P), meaning exploitation depends on the victim application actually loading/parsing an attacker-supplied PKCS#12 (PFX) or PKCS#8 file, so this is not a fully autonomous network worm despite AV:N. No EPSS score, SSVC decision data, KEV listing, or POC was provided in the input, so there is no public exploit identified at time of analysis and no evidence of active exploitation; the practical priority therefore rests on how exposed the affected application's file-parsing path is to untrusted input. The one conflicting signal to verify: AV:N implies network reachability, but the real trigger is processing a malicious file (75-byte PFX with a negative/zero MacData iteration count), so actual reachability is application-specific - a backend service that ingests user-uploaded certificates is at real risk, whereas a library linked but never fed untrusted PFX data is not. Patch is available from the vendor (bc-csharp 2.7.0), which makes remediation straightforward and lowers residual risk.

Exploit ScenarioDerived

An attacker uploads a tiny (~75-byte) crafted PFX file, or supplies a PKCS#8 encrypted private key using a PKCS#12 password-based algorithm, to any service that parses it via Bouncy Castle's Pkcs12Store.Load or Pkcs12ParametersGenerator. Because the MacData iteration count is zero or negative, the key-derivation loop wraps through roughly 2^32 iterations before the MAC or password is ever checked, pinning a CPU core for many minutes per file. No public exploit code was provided, but the trigger is trivial to reproduce from the public description and patch diff.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 02, 2026

Uncontrolled CPU consumption in Legion of the Bouncy Castle Inc.'s bc-csharp library before 2.7.0 lets an attacker who can supply a crafted PKCS#12 (PFX) file, or a PKCS#8 encrypted private key that uses a PKCS#12 password-based encryption algorithm, pin a CPU core for minutes at a time. The root cause is CWE-835, a loop with an unreachable exit condition: the PKCS#12 key-derivation loop in Pkcs12ParametersGenerator compared its counter with '!=' rather than '<', so an iteration count of zero or a negative value caused roughly 2^32 iterations to run before the MAC or password could ever be validated; a 75-byte PFX with a negative MacData iteration count kept Pkcs12Store.Load busy for many minutes. The impact is availability-only (CVSS 4.0 7.1, AV:N/AC:L/PR:N/UI:P, VA:H, with no confidentiality or integrity effect), so the flaw is an unauthenticated denial of service that depends on the victim application actually parsing attacker-controlled keystore data; only services that accept untrusted PFX/PKCS#8 input are realistically exposed, and no public exploit code was identified at time of analysis.

RemediationAI

Upgrade to bc-csharp 2.7.0 or later - Vendor-released patch: 2.7.0, incorporating upstream commits 0c7a6dfd64c4a479577e35a728a766721b79aba7 and 7c0ed15f9783c9595b1a53f3900136461fd944f4, which change the derivation loop condition from 'j != mIterationCount' to 'j < mIterationCount' so zero or negative iteration counts no longer loop ~2^32 times; see the vendor advisory at https://github.com/bcgit/bc-csharp/wiki/CVE-2026-63575. Until the dependency can be updated, the most effective compensating control is to reject or pre-screen keystore input: validate that the MacData and PBE iteration counts in any untrusted PFX/PKCS#8 blob are positive and within a sane upper bound (for example, matching the highest value your legitimate keystores use) before handing the bytes to Pkcs12Store.Load or to PKCS#8 decryption - the trade-off is that a bound set too low will reject legitimately hardened keystores, and parsing the counts yourself means handling ASN.1 structures defensively. Because the flaw is pure CPU exhaustion, running keystore parsing in a process with a hard CPU/time budget (cancellation token or watchdog that aborts after a few seconds, or a resource-limited sandbox/container) contains the impact; the trade-off is that very high but legitimate iteration counts may occasionally be aborted on slow hardware. Where untrusted keystore upload or import is not a required feature, disable that endpoint or restrict it to authenticated, trusted clients - and rate-limit such endpoints so a single 75-byte payload cannot repeatedly occupy a worker thread.

Affected VersionsENISA

bc-csharp 0 <2.7.0

Affected Packages

euvd bc_csharp fix: 2.7.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

bc-csharp is the .NET/C

port of the Bouncy Castle cryptography library, and the vulnerable component is Pkcs12ParametersGenerator, which implements the PKCS#12 password-based key derivation function (RFC 7292, Appendix B) used to derive keys and IVs from a password plus salt and iteration count. That KDF is invoked both when verifying the integrity MAC of a PKCS#12/PFX container (the MacData structure carries the iteration count) and when decrypting PKCS#8 EncryptedPrivateKeyInfo blobs that specify PKCS#12 PBE schemes such as pbeWithSHAAnd3KeyTripleDES-CBC or pbeWithSHAAnd40BitRC2-CBC. In GenerateDerivedKey the per-iteration loop was written as 'for (int j = 1; j != mIterationCount; j++)'; with an attacker-chosen iteration count of 0 or any negative number the equality test can never be satisfied legitimately, so the counter increments and wraps through roughly 2^32 iterations before terminating, burning CPU with no cryptographic progress and leaving the subsequent MAC or password check unreached. The upstream fix (commits 0c7a6dfd64c4a479577e35a728a766721b79aba7 and 7c0ed15f9783c9595b1a53f3900136461fd944f4) is the one-character class of correction 'for (int j = 1; j < mIterationCount; j++)', which makes non-positive counts fall through the loop immediately; note that this is a logic/loop-condition defect (CWE-835), not a memory-safety or cryptographic-strength weakness, and the underlying cryptographic primitive remains sound.

Know when Bc Csharp gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (bcorg) PRIMARY 7.1 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 6.5 MEDIUM

Unauthenticated (PR:N) but requires the app to process an attacker-supplied file (UI:R); impact is pure CPU-exhaustion DoS, so C:N/I:N and A:H.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (bcorg).

CVSS VectorVendor: bcorg

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

A high-severity flaw in the Bouncy Castle bc-csharp cryptography library (all versions before 2.7.0) lets an unauthenticated attacker pin a CPU core on a target system for minutes at a time simply by supplying a malformed PKCS#12 or encrypted PKCS#8 keystore file. Only organizations whose applications actually accept keystore or certificate data from untrusted sources are exposed, so the practical blast radius is narrower than the headline severity suggests, but those that are exposed face a cheap, repeatable service-disruption vector. Leadership should care because the risk is concentrated in certificate-onboarding, keystore-upload, and file-processing workflows that are typically internet-facing, and the effect is availability loss rather than any data compromise.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
High
Bouncy Castle is a core, widely-embedded cryptography library across the .NET ecosystem
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
Medium
Technical Impact
Partial

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2026-63569 CRITICAL
9.1 Oct 02

Crafted small-order or out-of-range Diffie-Hellman values passed to DHAgreement.CalculateAgreement in Bouncy Castle C# (

CVE-2026-103603 HIGH
8.7 Oct 02

Memory exhaustion in Bouncy Castle C# (bc-csharp) before 2.7.0 allows a remote, unauthenticated attacker to cause a deni

CVE-2026-63566 HIGH
8.7 Oct 02

Memory-exhaustion denial of service in the C# DTLS implementation of Bouncy Castle (bc-csharp) before 2.7.0 lets a remot

CVE-2026-63568 HIGH
8.7 Oct 02

Denial of service in Legion of the Bouncy Castle's C# cryptography library (bc-csharp) before 2.7.0 lets an unauthentica

CVE-2026-103600 HIGH
8.7 Oct 02

Uncontrolled recursion in Bouncy Castle C# (bc-csharp) before 2.7.0 allows unauthenticated remote attackers to crash or

CVE-2026-63574 HIGH
8.7 Oct 02

Denial of service in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows unauthenticated remote attackers to

CVE-2026-103604 HIGH
8.7 Oct 02

Denial of service in the Legion of the Bouncy Castle C# library (bc-csharp) affects all versions before 2.7.0, where qua

CVE-2026-16000 HIGH
8.7 Oct 02

Authentication-tag forgery in Legion of the Bouncy Castle Inc. bc-csharp (Bouncy Castle C#) before 2.7.0 lets a remote,

CVE-2026-63571 HIGH
8.7 Oct 02

Forged X.509 attribute certificates are accepted as valid by Legion of the Bouncy Castle Inc. bc-csharp versions before

CVE-2026-63567 HIGH
8.2 Oct 02

Observable padding discrepancy in the IES/ECIES decryption path of Bouncy Castle C# (bc-csharp) before 2.7.0 lets an una

CVE-2026-63573 HIGH
8.2 Oct 02

RSA PKCS#1 v1.5 key transport in the Bouncy Castle C# (bc-csharp) CMS implementation before 2.7.0 is vulnerable to a Ble

CVE-2026-103601 HIGH
8.2 Oct 02

Information disclosure in Bouncy Castle C# (bc-csharp) versions before 2.7.0 allows unauthenticated remote attackers to

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy