Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft X.509 name with long escape-heavy value
-
DeliverySubmit cert/CRL/CSR to target service
-
ExploitService parses and calls ToString/RdnAreEqual
-
ExecutionQuadratic escaping loop runs
-
ImpactCPU exhaustion denial of service
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
|
| Exploitation Conditions | Exploitation requires that the victim application (1) parses an attacker-supplied X.509 structure - certificate, CRL, certification request, or other DN-bearing structure - using bc-csharp before 2.7.0, AND (2) subsequently converts that name to a string via X509Name.ToString / IetfUtilities.ValueToString (for logging or display) OR compares it with IetfUtilities.RdnAreEqual, as PKIX path validation does when enforcing directoryName name constraints. The malicious attribute value must contain a long sequence of characters that must be escaped (commas, quotes, backslashes, +, =, <, >, ;) or long runs of leading/trailing spaces, so that the quadratic work dominates. The principal LIMITING factor is that merely accepting a certificate is insufficient - the vulnerable string-conversion or RDN-comparison code path must actually execute on the untrusted name; services that validate certificates without stringifying/comparing attacker-controlled DNs are not exposed. |
| Impact | This is a genuine availability-impact denial-of-service issue rather than a high-CVSS-but-low-real-risk artifact, but its real-world severity is heavily mediated by application behavior. The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) and the equivalent 3.1 profile both indicate a remote, unauthenticated, low-complexity vector with no confidentiality or integrity impact and HIGH availability impact - consistent with the CWE-407 (algorithmic complexity) root cause: a quadratic O(n^2) escaping loop in X509Name.ToString / IetfUtilities.ValueToString confirmed directly by the vendor commit diff (bd03e38). No EPSS score was supplied and the CVE is NOT in CISA KEV, so there is no evidence of active exploitation; the GitHub commit demonstrates the fix but no standalone weaponized POC is referenced. The 8.7 score is plausible for a network-reachable DoS, but note a key caveat: the attacker does not trigger the cost merely by sending a certificate - the victim application must convert the malicious name to a string (to log/display) or compare it via RdnAreEqual/PKIX directoryName name-constraint validation. Where that processing does not occur on untrusted input, real risk is substantially lower than the raw score implies. Treat as a patch-soon issue for any .NET service that parses and logs/validates externally-supplied X.509 material. |
| Exploit ScenarioDerived | A remote unauthenticated attacker submits a certificate, CRL, or certification request containing a distinguished name whose attribute value is a very long run of characters requiring RFC 4514 escaping (e.g. thousands of commas or leading/trailing spaces) to a .NET service that uses bc-csharp. When the service converts that name to a string to log or display it, or compares it during PKIX path validation of directoryName name constraints, the quadratic escaping routine consumes CPU proportional to n^2, exhausting a core and degrading or hanging the service. No public exploit is identified at time of analysis, but the vendor commit clearly documents the quadratic character-move cost. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 02, 2026
Denial of service in the Legion of the Bouncy Castle C
library (bc-csharp) affects all versions before 2.7.0, where quadratic CPU work in X.509 distinguished-name string conversion lets a remote unauthenticated attacker exhaust a server's CPU with a single crafted certificate, CRL, certification request, or other DN-bearing structure containing a long attribute value of characters that require RFC 4514 escaping. Exposure requires that the application actually converts the untrusted name to a string via X509Name.ToString / IetfUtilities.ValueToString (for logging or display) or compares it with IetfUtilities.RdnAreEqual, as PKIX path validation does when enforcing directoryName name constraints; merely parsing the certificate is not enough. There is no confirmed active exploitation (not in CISA KEV) and no public exploit code identified at time of analysis, but a vendor patch is available and the availability-only impact (CVSS:4.0 8.7 / assessed CVSS:3.1 7.5, A:H) makes application-level exposure the decisive risk factor.
RemediationAI
Vendor-released patch: upgrade Bouncy Castle bc-csharp to 2.7.0 or later (all earlier versions are affected), which contains the linear-time escaping rewrite in IetfUtilities.AppendValue/ValueToString and the X509Name constructor changes from commit bd03e38; see the vendor advisory at https://github.com/bcgit/bc-csharp/wiki/CVE-2026-103604. If an immediate upgrade is not possible, treat untrusted DNs as hostile input rather than normal strings: cap the size of accepted certificates, CRLs, PKCS#10 requests, and other ASN.1 structures at the transport or parser layer to bound the length of any attribute value before it reaches the vulnerable code path (trade-off: overly tight limits can reject legitimate enterprise DNs with long multi-valued RDNs), and avoid invoking X509Name.ToString, IetfUtilities.ValueToString, or IetfUtilities.RdnAreEqual on attacker-controlled names, for example by logging a hash or a pre-sanitized, length-truncated identifier instead of the raw name (trade-off: reduced diagnostic fidelity in logs and audit trails). Where directoryName name constraints are the trigger, non-validating deployments can temporarily disable or restrict that constraint type, but this weakens PKIX enforcement and should be paired with an upstream upgrade as soon as practical (trade-off: relaxing name-constraint checks can admit certificates outside the intended namespace). Finally, apply timeouts, per-request CPU budgets, and rate limiting on certificate-processing endpoints so a single pathological DN cannot monopolize worker threads; these are compensating controls only and do not remove the underlying quadratic behavior.
Affected VersionsENISA
Affected Packages
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
The root cause is CWE-407 (inefficient algorithmic complexity) inside Bouncy Castle's C
X.500 name formatting code, specifically IetfUtilities.ValueToString and the X509Name.ToString path that renders a distinguished name into its RFC 4514 string form. The pre-2.7.0 implementation escaped special characters by calling StringBuilder.Insert on the very buffer it was scanning, so each inserted backslash shifted the remaining content and forced an O(n) copy; with n escapable characters (',', '"', '\\', '+', '=', '<', '>', ';') or n leading/trailing spaces, the total work approached n^2/2 character moves, producing CPU exhaustion on attacker-sized RDN values. X509Name construction was also rewritten to consume AttributeTypeAndValue instances directly rather than re-parsing each sequence element. The CPE cpe:2.3:a:legion_of_the_bouncy_castle_inc.:bc-csharp:*:*:*:*:*:*:*:* matches all released variants of the library before 2.7.0, and Java consumers of the sibling Bouncy Castle distribution are not covered by this C#-specific record. The upstream fix (commit bd03e38) replaces the in-place escaping with a single linear pass that appends into a fresh StringBuilder, preserving identical output while making the conversion O(n); the same class of defect is what makes DN stringification of untrusted certificates a denial-of-service sink in PKI validation pipelines.
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
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
Remote attacker-supplied X.509 name triggers quadratic CPU cost with no auth or interaction (AV:N/AC:L/PR:N/UI:N); only availability is affected (C:N/I:N/A:H).
Primary rating from Vendor (bcorg).
CVSS VectorVendor: bcorg
DescriptionCVE.org
Inefficient algorithmic complexity in X.509 distinguished name string conversion (X509Name.ToString and IetfUtilities.ValueToString) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows a remote unauthenticated attacker to cause a denial of service through CPU exhaustion via a certificate, CRL, certification request or other structure whose name contains a long attribute value made up of characters that must be escaped, such as commas, or of leading or trailing spaces, because each escaping backslash was inserted into the buffer being scanned, so the work grew quadratically with the length of the value. Applications are exposed when they convert such a name to a string, for example to log or display it, or compare it with IetfUtilities.RdnAreEqual, as PKIX path validation does for directoryName name constraints.
Executive ViewAI
The Bouncy Castle C
cryptography library (bc-csharp), used across many .NET applications for certificate and PKI processing, is affected by a high-severity denial-of-service flaw in all versions prior to 2.7.0. A single crafted certificate, CRL, or certification request containing a long specially-formatted distinguished-name attribute can consume disproportionate CPU whenever an application converts that name to a string for logging or display, or compares it during PKIX path validation - meaning a small volume of malicious input can degrade or take down certificate-handling services. Leadership should care because affected systems are typically internet-facing TLS, PKI, or signing components, so the exposure is availability of customer-facing services rather than data loss, and remediation requires tracking down every application embedding the library rather than patching a single server.
Apply vendor patch. If upgrading to bc-csharp 2.7.0 cannot be completed immediately, restrict or rate-limit untrusted certificate, CRL, and CSR submission endpoints, and avoid calling X509Name.ToString / IetfUtilities.ValueToString on untrusted DN-bearing structures or comparing them with IetfUtilities.RdnAreEqual until the upgrade is in place.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Crafted small-order or out-of-range Diffie-Hellman values passed to DHAgreement.CalculateAgreement in Bouncy Castle C# (
Memory exhaustion in Bouncy Castle C# (bc-csharp) before 2.7.0 allows a remote, unauthenticated attacker to cause a deni
Memory-exhaustion denial of service in the C# DTLS implementation of Bouncy Castle (bc-csharp) before 2.7.0 lets a remot
Denial of service in Legion of the Bouncy Castle's C# cryptography library (bc-csharp) before 2.7.0 lets an unauthentica
Uncontrolled recursion in Bouncy Castle C# (bc-csharp) before 2.7.0 allows unauthenticated remote attackers to crash or
Denial of service in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows unauthenticated remote attackers to
Authentication-tag forgery in Legion of the Bouncy Castle Inc. bc-csharp (Bouncy Castle C#) before 2.7.0 lets a remote,
Forged X.509 attribute certificates are accepted as valid by Legion of the Bouncy Castle Inc. bc-csharp versions before
Observable padding discrepancy in the IES/ECIES decryption path of Bouncy Castle C# (bc-csharp) before 2.7.0 lets an una
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
Information disclosure in Bouncy Castle C# (bc-csharp) versions before 2.7.0 allows unauthenticated remote attackers to
Certificates that should be rejected by PKIX name constraints are accepted by Legion of the Bouncy Castle Inc. bc-csharp
EUVD-2026-91234
GHSA-p48w-99f8-9598
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB