# CVE-2026-103603: Bouncy Castle C# HSS/LMS memory exhaustion in public key parsing

Source: https://junglewise.ai/threats/cve-2026-103603-memory-allocation-with-excessive-size-value-in-the-hss-lms  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-02. Updated: 2026-10-05  
License: CC BY 4.0 with a link back

CVE-2026-103603 · Severity: info · Published 2026-10-02

Bouncy Castle Cryptography for .NET is a cryptographic library used in applications that need to verify digital signatures and certificates. A flaw in how it parses HSS/LMS public keys allows an attacker to provide a malicious key that causes the application to allocate up to 17 GB of memory, resulting in service outage or crashes.

Technologies: [Legion of the Bouncy Castle Inc. BouncyCastle.Cryptography](https://junglewise.ai/threats/technologies/legion-of-the-bouncy-castle-inc-bouncycastle-cryptography). Vendors: [Legion of the Bouncy Castle Inc.](https://junglewise.ai/threats/vendors/legion-of-the-bouncy-castle-inc).

## Quick answers

**Is CVE-2026-103603 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-103603 being exploited in the wild.

**How severe is CVE-2026-103603?** Informational severity, published 2 October 2026.

**Which products and versions are affected?** Legion of the Bouncy Castle Inc. BouncyCastle.Cryptography before 2.7.0.

**Is there a fix for CVE-2026-103603?** Yes: fixed in BouncyCastle.Cryptography 2.7.0. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-103603 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-103603?** Check whether you run Legion of the Bouncy Castle Inc. BouncyCastle.Cryptography at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in BouncyCastle.Cryptography 2.7.0

## Technical details

The HSS/LMS public key parser in HssPublicKeyParameters fails to validate that the level count (L) parameter complies with RFC 8554's maximum of 8, allowing an attacker-supplied value to exceed this limit. During signature verification, the code allocates an array of L-1 entries before validating further data, enabling memory exhaustion. A single verification can consume approximately 17 GB or trigger an OutOfMemoryException.

## Affected products

- Legion of the Bouncy Castle Inc. BouncyCastle.Cryptography before 2.7.0

## Timeline

- 2026-10-02: disclosed
- 2026-06-15: patched: Fix committed adding RFC 8554 validation for L parameter range (1-8)

## References

- [https://www.nuget.org/packages/BouncyCastle.Cryptography](https://www.nuget.org/packages/BouncyCastle.Cryptography)
- [https://github.com/bcgit/bc-csharp/commit/f47ad47c7b5745b53d3f9ac711a5a419a272a5d7](https://github.com/bcgit/bc-csharp/commit/f47ad47c7b5745b53d3f9ac711a5a419a272a5d7)

## Related threats

- [Bouncy Castle attribute certificate signature validation bypass](https://junglewise.ai/threats/cve-2026-63571-improper-verification-of-cryptographic-signature-in-the-attribute)
- [Bouncy Castle CCM AEAD decryption plaintext disclosure](https://junglewise.ai/threats/cve-2026-103601-release-of-unverified-plaintext-in-the-ccm-ccmblockcipher-and)
- [Bouncy Castle ASN.1 parser uncontrolled recursion](https://junglewise.ai/threats/cve-2026-103600-uncontrolled-recursion-in-the-asn-1-parser-asn1inputstream)
- [Bouncy Castle C# DHAgreement improper input validation](https://junglewise.ai/threats/cve-2026-63569-improper-input-validation-in-dhagreement-calculateagreement-mti)
- [Bouncy Castle C# IesEngine padding oracle in CBC mode](https://junglewise.ai/threats/cve-2026-63567-observable-discrepancy-in-iesengine-decryptblock-in-legion-of-the)
