Skip to main content

bc-csharp CVE-2026-63572

| EUVDEUVD-2026-91223 HIGH
Allocation of Resources Without Limits or Throttling (CWE-770)
2026-10-02 bcorg GHSA-v54c-wxx6-mjh6
7.1
CVSS 4.0 · Vendor: bcorg
View

Attack ChainAIDerived

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

  1. Access
    Craft PFX with ~2^31 iteration count
  2. Delivery
    Submit file to app that loads keystores
  3. Exploit
    Pkcs12Store.Load reads unbounded count
  4. Execution
    Key derivation runs before MAC check
  5. Impact
    CPU exhaustion denial of service

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
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 target application must invoke Pkcs12Store.Load or Pkcs12Utilities.ConvertToDefiniteLength (bc-csharp before 2.7.0) on a PKCS#12/PFX file whose content is attacker-controlled, with a crafted iteration count near 2^31 placed in MacData or in the PBE parameters of an encrypted SafeContents or shrouded key bag. No valid password or MAC is required because key derivation executes before the MAC or password is checked (PR:N). The key LIMITING factor is UI:P: an attacker cannot trigger this remotely on their own - a victim application or user must actually accept and load the malicious keystore, so deployments that only process trusted local PFX files are not realistically exposed.

Impact

This is a genuine but moderate-priority denial-of-service issue, not a high-impact RCE despite the 7.1 score. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H) shows the real shape: impact is availability-only (VA:H) with no confidentiality or integrity effect, and exploitation requires passive user interaction (UI:P) - specifically, a victim application must load an attacker-supplied PKCS#12/PFX file. The source-code evidence (fix adds a DefaultMaxIterations=5,000,000 bound via Pkcs12Utilities.ValidateIterations) confirms the root cause: the iteration count is read from the file with no upper bound and key derivation runs BEFORE the MAC or password is checked, so no authentication to the keystore is needed. Exploitation status is 'no public exploit identified at time of analysis' - the input provides neither KEV nor POC signals, and no EPSS score is supplied, so exploitation probability cannot be quantified. Real-world risk hinges entirely on whether a given deployment feeds untrusted PFX files into bc-csharp; for services that accept user-uploaded keystores this is a realistic availability threat, while for applications that only load trusted local keystores the practical risk is low.

Exploit ScenarioDerived

An attacker uploads or submits a crafted PKCS#12 (PFX) file to an application that uses bc-csharp (before 2.7.0) to load keystores - for example a certificate-import endpoint. When the application calls Pkcs12Store.Load (or Pkcs12Utilities.ConvertToDefiniteLength), the embedded MacData or PBE iteration count near 2^31 drives key derivation before any MAC/password check, pinning a CPU core and causing denial of service. No public exploit code is identified at time of analysis, but the condition is trivial to craft given the published fix.

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

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

Alert me

AnalysisAIv1 – Oct 02, 2026

CPU exhaustion denial of service in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 lets unauthenticated remote attackers tie up a process by supplying a crafted PKCS#12 (PFX) keystore. Pkcs12Store.Load and Pkcs12Utilities.ConvertToDefiniteLength take the key-derivation iteration count straight from the file - in MacData or in the PBE parameters of an encrypted SafeContents or shrouded key bag - without an upper bound, so a count approaching 2^31 forces enormous key-derivation work before the MAC or password is ever validated (PR:N per the assessed CVSS:3.1 vector). Exploitation is not autonomous: the assessed UI:R/UI:P condition means some victim application or user must actually accept and load the malicious keystore, so no public exploit code has been identified at time of analysis and there is no CISA KEV listing; this is a genuine but moderate-priority availability issue rather than remote code execution despite the 7.1 CVSS 4.0 score.

RemediationAI

Vendor-released patch: upgrade bc-csharp to 2.7.0 or later, which introduces Pkcs12Utilities.ValidateIterations and enforces a default ceiling of 5,000,000 iterations on values read from MacData and PBE parameter blocks (see https://github.com/bcgit/bc-csharp/wiki/CVE-2026-63572 and the referenced fix commits). Where an immediate upgrade is not possible, the most effective compensating control is to parse the untrusted PFX ASN.1 yourself before handing it to Pkcs12Store.Load or Pkcs12Utilities.ConvertToDefiniteLength: read MacData.Iterations and the PBE iteration fields of every encrypted SafeContents and shrouded key bag, and reject any file whose count is negative or exceeds a sane business threshold (the upstream default of 5,000,000 is a reasonable starting point) - the trade-off is that rejecting high counts will also refuse legitimately hardened keystores generated with very large iteration counts, so pair it with a clear error message and a documented threshold. Additionally, wrap keystore loading in a hard timeout and process it out-of-band from latency-sensitive request threads (a worker queue or short-lived task with a watchdog) so a single malicious file cannot stall the whole service; this does not prevent the CPU burn but bounds its blast radius. If raising the Org.BouncyCastle.Pkcs12.MaxIterations environment variable above the default for compatibility with existing keystores, do so only on trusted, non-internet-facing import paths, since a higher limit proportionally restores the attack surface. Finally, restrict which endpoints and identities may submit PFX files, and treat untrusted keystore import as a privileged operation; deployments that only load trusted local PFX files are not realistically exposed and need not rush an emergency change once the patched library is available.

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

PKCS#12 (PFX) is an ASN.1 container format for private keys and certificates that wraps content in an authenticated SafeContents structure; integrity is protected by an HMAC computed over MacData, and encrypted bags and shrouded key bags are protected by password-based encryption (PBE) parameters that carry a salt and an iteration count. In bc-csharp, PbeUtilities.GenerateAlgorithmParameters builds the Pkcs12PbeParams from the caller-supplied iteration count, and Pkcs12Store.CalculatePbeMac applies that count when deriving the MAC key. The vulnerability is CWE-770 (Allocation of Resources Without Limits or Throttling): the iteration count read from MacData.Iterations or from a PBE parameter block is passed directly into the key-derivation loop with no ceiling, and because derivation executes before the MAC is checked or the password verified, an invalid password gives the attacker no protection - the CPU cost is paid regardless. The upstream fix adds Pkcs12Utilities.ValidateIterations, rejects values that do not fit in a signed 32-bit int, rejects negative values, enforces a default maximum of 5,000,000 iterations (overridable via the Org.BouncyCastle.Pkcs12.MaxIterations environment variable), and routes both the MAC path and the PBE parameter generation through that validation. The related zero-or-negative-count case is tracked separately as CVE-2026-63575, confirming this family of input-validation gaps in the same loader.

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

A crafted PFX can arrive over the network (AV:N) and needs no authentication to the keystore (PR:N), but a victim must load it (UI:R); impact is availability-only (A:H, C/I:N).

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

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.

Executive ViewAI

Why It Matters

Organizations using Bouncy Castle bc-csharp versions before 2.7.0 in applications that load PKCS#12 keystores face a CPU exhaustion denial-of-service risk that can degrade or halt service availability. The issue is unauthenticated but requires a victim application or user to accept and load a malicious keystore; no public exploit identified at time of analysis, and a vendor patch is available in 2.7.0. Leadership should prioritize patching externally facing or business-critical services that process untrusted keystores to prevent avoidable availability disruptions.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 76% exploitable
Prevalence
High
BouncyCastle C# is a widely deployed cryptography library across .NET applications
Data Quality
7 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.3%
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