Skip to main content

Bouncy Castle C# CVE-2026-103600

| EUVDEUVD-2026-91230 HIGH
Uncontrolled Recursion (CWE-674)
2026-10-02 bcorg GHSA-xp76-rp77-x5w9
8.7
CVSS 4.0 · Vendor: bcorg
View

Attack ChainAIDerived

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

  1. Access
    Reach endpoint parsing untrusted ASN.1
  2. Delivery
    Deliver ~8 KB deeply nested DER/BER
  3. Exploit
    Recursive parser descends per nesting level
  4. Execution
    Thread stack exhausted, uncatchable StackOverflowException
  5. Impact
    Process terminates (denial of service)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
Exploitation Conditions

Exploitation requires that the target application use bc-csharp before 2.7.0 to parse attacker-supplied ASN.1 data through any path that reaches Asn1InputStream/Asn1StreamParser - including X.509 certificate/CRL validation, CMS/PKCS#7, PKCS#8/PKCS#12, OCSP, or TLS Certificate-message handling - with no authentication or user interaction needed (PR:N/UI:N). The crafted input needs only ~2,000 levels of nested constructed elements (~8 KB DER, or indefinite-length BER) to reach the default depth. The outright process-killing crash requires the parsing thread to run on the ~1.5 MB default stack (the .NET main-thread default on Windows); on threads configured with larger stacks the effect is instead a quadratic CPU slowdown (about 9 seconds for 64 KB) rather than an immediate StackOverflowException. The practical limiting factor is therefore thread stack size and whether the deployment exposes untrusted ASN.1 parsing to remote input.

Impact

This is a credible, actionable availability risk rather than a high-CVSS-but-low-real-risk issue. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) confirms network-reachable, low-complexity, unauthenticated exploitation with no user interaction, and the impact is confined to availability (VA:H; VC:N/VI:N) - consistent with a DoS and CWE-674 (Uncontrolled Recursion). The severity is amplified by the failure mode: a StackOverflowException in .NET cannot be caught and terminates the entire process, so a single ~8 KB crafted input can take down a service outright on default Windows main-thread stacks; on larger stacks the impact degrades to quadratic CPU consumption (~9s for 64 KB) rather than a crash. No EPSS score, KEV listing, or POC was provided in the input, so predicted and confirmed exploitation signals are absent - exploitation status is 'no public exploit identified at time of analysis.' However, absence of those signals should not be read as low risk: the vendor (Bouncy Castle) has published an advisory and shipped a fix, the bug is trivially reproducible, and the exposed attack surface (any untrusted ASN.1: X.509 certs/CRLs, CMS/PKCS#7, PKCS#8/PKCS#12, OCSP, TLS Certificate messages) is reached by routine TLS and PKI operations. There are no conflicting signals: the network vector in the CVSS vector matches the description's remote/untrusted-input premise.

Exploit ScenarioDerived

An attacker sends a crafted ASN.1 structure - roughly 2,000 nested SEQUENCE-in-SEQUENCE elements in about 8 KB of DER/BER - to any endpoint of an affected .NET application that parses untrusted ASN.1, such as a TLS server/client processing a Certificate message, or a service validating a submitted X.509 certificate or CMS/PKCS#7 blob. The recursive parser descends one call per nesting level with no depth bound, exhausting the ~1.5 MB default thread stack and raising an uncatchable StackOverflowException that crashes the whole process. No public exploit was identified at time of analysis, but the technique is simple and fully described in the advisory.

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

Uncontrolled recursion in Bouncy Castle C

(bc-csharp) before 2.7.0 allows unauthenticated remote attackers to crash or stall applications that parse attacker-supplied ASN.1 by submitting deeply nested constructed elements. About 2,000 nesting levels (roughly 8 KB of DER) exhaust the default ~1.5 MB .NET thread stack and raise a StackOverflowException that cannot be caught and terminates the process, while on threads with larger stacks the same input causes quadratic parse-time growth (about 9 seconds of CPU for 64 KB). Any code path that parses untrusted X.509 certificates or CRLs, CMS/PKCS#7, PKCS#8/PKCS#12, OCSP, or TLS Certificate messages is affected; no public exploit code has been identified at time of analysis, and the vendor has released a fix in version 2.7.0.

RemediationAI

Upgrade to Bouncy Castle C

(bc-csharp) 2.7.0 or later, which introduces bounded recursion depth in Asn1InputStream and Asn1StreamParser; the vendor advisory is https://github.com/bcgit/bc-csharp/wiki/CVE-2026-103600 and the relevant commits are 89c81b0da7fe11cd70013285560bbc472cb73901 and b99f4e3dcea05b57becc79dfa6ad91a54c778d65. After upgrading, the default maximum nesting depth is 32 and can be tuned via the environment variable Org.BouncyCastle.Asn1.MaxDepth (property name Org.BouncyCastle.Asn1.MaxDepth); lowering it reduces exposure but may reject legitimate deeply nested but valid structures, while raising it increases resource-exhaustion risk. If upgrading is not immediately possible, treat all untrusted ASN.1 input as hostile: perform parsing in an isolated worker process with a limited CPU and memory budget, and monitor or time out that worker so a StackOverflowException or quadratic slowdown does not take down the main service; reject inputs that exceed a conservative size threshold or an application-level nesting limit before they reach the library, since 8 KB is enough to trigger the crash on default stacks. Running parsing on threads with large stacks only converts the immediate process termination into a CPU-exhaustion slowdown (about 9 seconds for 64 KB), so if that trade-off is used it must be paired with strict per-request timeouts and request throttling. There is no vendor-supported configuration in pre-2.7.0 releases to cap parser depth, so the patch is the only complete fix.

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

This is a CWE-674 uncontrolled-recursion defect in the ASN.1 parsing stack of Bouncy Castle for .NET (bc-csharp), specifically in Asn1InputStream and Asn1StreamParser. ASN.1 constructed types such as SEQUENCE and SET can legally contain nested constructed elements, and both definite-length DER and indefinite-length BER encodings allow arbitrary nesting. Before 2.7.0 the parser descended into each nested constructed value with a fresh recursive call and imposed no bound on recursion depth, so attacker-controlled input controlled stack consumption and parse time. On the .NET runtime a StackOverflowException cannot be caught or handled in managed code, so exhausting the stack terminates the whole process; the default main-thread stack on Windows is about 1.5 MB, which about 2,000 nesting levels can exhaust. On threads with larger configured stacks the same class of input instead drives roughly quadratic CPU time. The CPE entry (cpe:2.3:a:legion_of_the_bouncy_castle_inc.:bc-csharp:*:*:*:*:*:*:*:*) covers all pre-2.7.0 releases. The vendor patch adds explicit depth accounting to Asn1InputStream and Asn1StreamParser, a default maximum nesting depth of 32, and an environment-variable override named Org.BouncyCastle.Asn1.MaxDepth (MaxDepthProperty), so that recursive descent is bounded rather than unbounded.

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 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Remote unauthenticated parsing of crafted ASN.1 (AV:N/AC:L/PR:N/UI:N) crashes the whole process for availability-only impact (A:H; C/I:N), with no security scope change (S:U).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/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
None
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

Uncontrolled recursion in the ASN.1 parser (Asn1InputStream, Asn1StreamParser) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows a remote unauthenticated attacker to cause a denial of service via a crafted ASN.1 encoding of deeply nested constructed elements (for example SEQUENCE inside SEQUENCE, in definite-length DER or indefinite-length BER form), because each nesting level is parsed by a further recursive call with no bound on depth. About 2,000 levels (8 KB of DER) are enough to exhaust a 1.5 MB thread stack, the .NET main-thread default on Windows, and raise a StackOverflowException, which .NET cannot catch and which terminates the whole process; on threads with larger stacks, parse time instead grows quadratically with depth (about 9 seconds of CPU for a 64 KB input). Any path that parses untrusted ASN.1 is exposed, including X.509 certificates and CRLs, CMS/PKCS#7, PKCS#8/PKCS#12, OCSP and TLS Certificate messages.

Executive ViewAI

Why It Matters

Bouncy Castle C

(bc-csharp) versions prior to 2.7.0 contain a high-severity uncontrolled recursion flaw that can crash or stall applications parsing untrusted ASN.1 data, including X.509 certificates, CMS/PKCS#7, PKCS#8/PKCS#12, OCSP, and TLS Certificate messages. This poses a denial-of-service risk to any service that processes attacker-supplied cryptographic artifacts, potentially causing unexpected outages and disrupting business operations. No public exploit identified at time of analysis, but leadership should prioritize remediation because the vulnerability is remotely triggerable and affects widely used cryptographic libraries across the organization's .NET applications.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 78% exploitable
Prevalence
High
bc-csharp is a widely used cryptography/PKI library across .NET applications
Data Quality
5 sources
Confidence: Medium

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
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
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-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

CVE-2026-103602 HIGH
8.2 Oct 02

Certificates that should be rejected by PKIX name constraints are accepted by Legion of the Bouncy Castle Inc. bc-csharp

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