Skip to main content
EPSS 0.3%top 78%

CVE-2026-103600: CWE-674 Uncontrolled Recursion in Legion of the Bouncy Castle Inc. bc-csharp

0
High
VulnerabilityCVE-2026-103600cvecve-2026-103600cwe-674
Published: 10/02/2026 (10/02/2026, 07:08:51 UTC)
Source: CVE Database V5
Vendor/Project: Legion of the Bouncy Castle Inc.
Product: bc-csharp

Description

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.

CVSS v4.0

Score 8.7high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

Legion of the Bouncy Castle Inc.

bc-csharp

Affected versions
>=0 <2.7.0
BouncyCastle.Cryptography
pkg:nuget/BouncyCastle.Cryptography
Affected versions
>=0 <2.7.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/02/2026, 07:47:13 UTC

Technical Analysis

The vulnerability arises from the ASN.1 parser in bc-csharp versions prior to 2.7.0, which uses recursive calls to parse nested ASN.1 constructed elements without limiting recursion depth. Approximately 2,000 nested levels (about 8 KB of DER data) can exhaust the default 1.5 MB thread stack on Windows, causing a StackOverflowException that terminates the process. On threads with larger stacks, parsing time increases quadratically with nesting depth, significantly degrading performance. This flaw allows remote unauthenticated attackers to trigger denial of service by supplying malicious ASN.1 data in various protocols and formats that rely on ASN.1 parsing.

Potential Impact

Successful exploitation results in denial of service due to stack exhaustion and process termination via a StackOverflowException in the .NET runtime. This affects any application using vulnerable versions of bc-csharp to parse untrusted ASN.1 data, potentially disrupting services that handle certificates, cryptographic messages, and related protocols. There is no indication of code execution or data disclosure from this vulnerability.

Mitigation Recommendations

A fixed version 2.7.0 of bc-csharp is available that addresses this uncontrolled recursion issue. Users should upgrade to version 2.7.0 or later to remediate this vulnerability. No other vendor advisory content is provided, so patching is the primary recommended mitigation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
bcorg
Date Reserved
2026-09-30T23:01:10.053Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6abf5de5a43b0b3b8988e873

Added to database: 10/02/2026, 07:31:49 UTC

Last enriched: 10/02/2026, 07:47:13 UTC

Last updated: 10/02/2026, 21:45:56 UTC

Views: 13

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses