Infinite loop 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.19% (9th 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-20537005
  • published6 Oct 2026
  • disclosed2 Oct 2026
  • creditPaweł Łukasik

Introduced: 2 Oct 2026

NewCVE-2026-63575  (opens in a new tab)
CWE-835  (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 Infinite loop through the GenerateDerivedKey loop in Pkcs12ParametersGenerator in crypto/src/crypto/generators/Pkcs12ParametersGenerator.cs. An attacker can exhaust CPU by supplying a PKCS#12 PFX file or PKCS#8 encrypted private key with an iteration count of zero or a negative value. The loop used j != mIterationCount as its exit condition, so invalid counts caused it to wrap through roughly 2^32 iterations before MAC verification or password checking completed. This can keep PKCS#12 parsing busy for minutes and block applications that load attacker-controlled PKCS#12 material.

CVSS Base Scores

version 4.0
version 3.1