Uncontrolled Recursion Affecting bouncycastle.cryptography package, versions [,2.7.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.32% (23rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DOTNET-BOUNCYCASTLECRYPTOGRAPHY-20537032
  • published6 Oct 2026
  • disclosed2 Oct 2026
  • creditYt

Introduced: 2 Oct 2026

NewCVE-2026-103600  (opens in a new tab)
CWE-674  (opens in a new tab)

How to fix?

Upgrade BouncyCastle.Cryptography to version 2.7.0 or higher.

Overview

Affected versions of this package are vulnerable to Uncontrolled Recursion in the ASN.1 parser through the Asn1InputStream and Asn1StreamParser nested constructed-element parsing paths. An attacker can trigger a denial of service by supplying a crafted ASN.1 encoding with deeply nested SEQUENCE or other constructed elements that causes recursive descent until the thread stack is exhausted. The flaw affects any code path that parses untrusted ASN.1, including DER and BER inputs such as X.509 certificates, CRLs, CMS/PKCS#7, PKCS#8/PKCS#12, OCSP responses, and TLS Certificate messages. When the nesting is deep enough, parsing terminates the process with a StackOverflowException or burns excessive CPU on large-stack threads.

CVSS Base Scores

version 4.0
version 3.1