Memory Allocation with Excessive Size Value 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-20537000
  • published6 Oct 2026
  • disclosed2 Oct 2026

Introduced: 2 Oct 2026

NewCVE-2026-63574  (opens in a new tab)
CWE-789  (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 Memory Allocation with Excessive Size Value through SignatureSubpacketsReader.ReadPacket and UserAttributeSubpacketsReader.ReadPacket in the OpenPGP subpacket parsers. An attacker can trigger denial of service by supplying a crafted OpenPGP public key, certificate, or signature with a five-octet subpacket length header that makes the parser allocate a huge buffer before reading any subpacket data. The parsers trusted the declared body length and only rejected values above int.MaxValue, so a few bytes of input could force multi-gigabyte allocation attempts and exhaust memory or raise OutOfMemoryException during parsing.

CVSS Base Scores

version 4.0
version 3.1