Skip to main content

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

0
High
Published: 10/02/2026 (10/02/2026, 07:08:51 UTC)
Source: GCVE Database
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

bc-csharp
pkg:nuget/bc-csharp
Affected versions
<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, 18:21:44 UTC

Technical Analysis

The vulnerability (CVE-2026-103600) is due to uncontrolled recursion in the ASN.1 parser implementations Asn1InputStream and Asn1StreamParser in Legion of the Bouncy Castle Inc. bc-csharp versions prior to 2.7.0. When parsing ASN.1 data with deeply nested constructed elements (e.g., SEQUENCE inside SEQUENCE), the parser makes recursive calls without limiting the recursion depth. Approximately 2,000 nested levels (about 8 KB of DER data) can exhaust a 1.5 MB thread stack, causing a StackOverflowException that terminates the entire process. On threads with larger stacks, the parsing time increases quadratically with the nesting depth, potentially causing significant CPU consumption. This affects any code paths that parse untrusted ASN.1 data, including common cryptographic formats and protocols.

Potential Impact

A remote unauthenticated attacker can cause a denial of service by triggering a stack overflow in the ASN.1 parser, leading to process termination. This affects applications using the vulnerable bc-csharp library to parse untrusted ASN.1 data such as certificates and cryptographic messages. There is no indication of code execution or data disclosure from this vulnerability. The denial of service impact is high due to the inability of .NET to catch the StackOverflowException and the termination of the entire process.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid parsing untrusted ASN.1 data with vulnerable versions of bc-csharp. Monitor vendor communications for updates and apply official patches once released.

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

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-xp76-rp77-x5w9
Osv Schema Version
1.4.0
Aliases
["CVE-2026-103600"]
Database Specific Severity
HIGH
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6abfeeb8a43b0b3b89e561b4

Added to database: 10/02/2026, 17:49:44 UTC

Last enriched: 10/02/2026, 18:21:44 UTC

Last updated: 10/02/2026, 22:45:55 UTC

Views: 5

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