Skip to main content

Bouncy Castle C# EUVDEUVD-2026-91233

| CVE-2026-103603 HIGH
Memory Allocation with Excessive Size Value (CWE-789)
2026-10-02 bcorg GHSA-gpr4-c479-xrw4
8.7
CVSS 4.0 · Vendor: bcorg
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach HSS/LMS signature verification endpoint
  2. Delivery
    Supply crafted HSS public key with oversized level count L
  3. Exploit
    Parser skips RFC 8554 max-of-8 check
  4. Execution
    Signature parse allocates L-1 entry array (~17 GB)
  5. Impact
    Memory exhaustion / OutOfMemoryException crashes process

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory allocation limits
Exploitation Conditions

The affected application must actually use the HSS/LMS (RFC 8554 hash-based) signature verification path in bc-csharp before 2.7.0 and must accept both the HSS public key AND the signature from an untrusted source, since parsing of an attacker-supplied public key's level count L drives the oversized allocation during signature parsing. No authentication or user interaction is required (PR:N/UI:N), and default parsing is vulnerable once this code path is invoked; the principal limiting factor is that HSS/LMS is a niche post-quantum feature not exercised by most deployments, so applications that never verify HSS/LMS signatures or only process trusted keys are not exposed.

Impact

This is a genuine but bounded availability-only issue. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) with VC:N/VI:N/VA:H and a base score of 8.7 correctly characterizes it as a remote, unauthenticated, low-complexity denial-of-service with no confidentiality or integrity impact - consistent with CWE-789 (memory allocation with excessive size value) and the description, in which an unchecked HSS level count L (RFC 8554 maximum is 8) drives an allocation of L-1 entries, committing up to ~17 GB or throwing OutOfMemoryException on a single verification. The patch commit (f47ad47) confirms the root cause by adding an explicit L range check. No EPSS score, no CISA KEV listing, and no public exploit code are present in the provided data, so exploitation status is 'no public exploit identified at time of analysis'; absence of EPSS/KEV is not itself a risk-reducer but signals no evidence of active or widespread exploitation. The most important caveat the raw score hides: the high-VA rating assumes the vulnerable HSS/LMS hash-based signature code path is actually reached with attacker-controlled input, which is a comparatively niche feature of the library, so real-world exposure is much narrower than the 8.7 implies.

Exploit ScenarioDerived

An application uses bc-csharp (before 2.7.0) to verify HSS/LMS hash-based signatures on untrusted input. An attacker submits a crafted HSS public key whose level count L is set far above the RFC 8554 limit of 8, together with a matching signature; signature parsing then allocates an L-1 entry array before validating further, exhausting memory and taking the process down. No public exploit code is identified at time of analysis, but the trigger is a single verification call with no authentication.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 02, 2026

Memory exhaustion in Bouncy Castle C

(bc-csharp) before 2.7.0 allows a remote, unauthenticated attacker to cause a denial of service against applications that verify HSS/LMS (RFC 8554) signatures using an attacker-supplied public key, because the HSS level count L is parsed without being bounded and then drives a huge array allocation during signature parsing - a single verification can commit roughly 17 GB of memory or terminate with an OutOfMemoryException. Impact is availability-only (CVSS 4.0 base 8.7; assessed CVSS 3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H): no confidentiality or integrity loss, and no authentication or user interaction is required. Exposure is bounded by the fact that HSS/LMS is a niche post-quantum feature, so only deployments that parse untrusted HSS keys and then verify signatures are affected; no public exploit identified at time of analysis, and no evidence of confirmed active exploitation (no CISA KEV listing).

RemediationAI

Upgrade Bouncy Castle C

(bc-csharp) to 2.7.0, the release in which the HSS/LMS parsing checks are included, or apply the upstream fix commit f47ad47c7b5745b53d3f9ac711a5a419a272a5d7, which enforces the RFC 8554 bound of 1 <= L <= 8 when reading an HSS public key and rejects encodings with trailing data; vendor details are at https://github.com/bcgit/bc-csharp/wiki/CVE-2026-103603. Until the upgrade can be deployed, the most effective compensating control is to stop treating attacker-supplied HSS/LMS material as trusted: if the application does not actually need HSS/LMS verification, remove or disable that code path entirely (side effect: loss of post-quantum hash-based signature support, which is a niche feature in most deployments). If it does need it, validate the level count and the overall encoding length before handing bytes to the library - reject HSS public keys whose L falls outside 1..8 and reject keys whose encoded length does not match the expected 24 + m bytes, and only verify signatures against public keys obtained from a trusted store rather than from the same untrusted channel as the signature (side effect: requires moving key provisioning to a trusted path and may not be possible for peer-supplied key protocols). Additional containment options with trade-offs include running the verification service in a process with a hard memory cap or cgroup limit so the oversized allocation kills only that worker instead of the host (side effect: legitimate large verifications may also be killed and the DoS still succeeds against the worker), rate-limiting or load-balancing signature-verification endpoints so a single request cannot monopolize memory (side effect: adds latency and does not stop the allocation itself), and monitoring for OutOfMemoryException events from HSS/LMS parsing as an indicator of attempted abuse. No vendor-released patch version other than 2.7.0 should be assumed.

Affected VersionsENISA

bc-csharp 0 <2.7.0

Affected Packages

euvd bc_csharp fix: 2.7.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw lives in the HSS/LMS (Hierarchical Signature System / Leighton-Micali Signature) implementation of Bouncy Castle's .NET library, specifically HssPublicKeyParameters and HssSignature under crypto/src/pqc/crypto/lms. Per RFC 8554 Section 6, an HSS public key encodes a level count L that must be between 1 and 8; the vulnerable code read L from the public key encoding and used it directly, with no range check, and HssSignature parsing then allocated an array of L - 1 entries before consuming any further signature bytes. This is CWE-789 (memory allocation with excessive size value): an attacker-controlled length field is trusted as an allocation size, so a crafted public key with an oversized L causes an out-of-proportion, per-request allocation (about 17 GB in the reported worst case) that exhausts process or host memory. The upstream fix commit f47ad47c7b5745b53d3f9ac711a5a419a272a5d7 adds the RFC 8554 range check (rejecting L < 1 or L > 8 with InvalidDataException), routes parsing through MemoryStream-based overloads that also enforce exact consumption of the input bytes (rejecting trailing data after the HSS/LMS public key or HSS signature), and reworks the internal Parse(byte[]/offset/length) helpers accordingly, with new PublicKeyParseTests covering typecode and level-count well-formedness. The CPE string cpe:2.3:a:legion_of_the_bouncy_castle_inc.:bc-csharp:*:*:*:*:*:*:*:* identifies the affected package across all platform entries prior to the fixed release.

Know when Bc Csharp gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (bcorg) PRIMARY 8.7 HIGH
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
vuln.today AI 7.5 HIGH

Remote, unauthenticated, low-complexity parsing of attacker-supplied key and signature (AV:N/AC:L/PR:N/UI:N); only availability impacted via memory exhaustion, so C:N/I:N/A:H.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (bcorg).

CVSS VectorVendor: bcorg

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Memory allocation with excessive size value in the HSS/LMS signature code (HssPublicKeyParameters, HssSignature) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows a remote unauthenticated attacker who can supply both an HSS public key and a signature to cause a denial of service through memory exhaustion via a public key encoding with an excessive level count, because the level count L read when parsing an HSS public key was not checked against the RFC 8554 maximum of 8, and signature parsing then allocated an array of L - 1 entries before reading any further signature data. A single verification can commit up to about 17 GB of memory or fail with an OutOfMemoryException.

Executive ViewAI

Why It Matters

A memory-exhaustion flaw in Bouncy Castle C

(bc-csharp) versions before 2.7.0 lets an unauthenticated remote party crash applications that verify HSS/LMS signatures against an attacker-supplied public key, with a single verification able to consume roughly 17 GB of memory and trigger an out-of-memory termination. The effect is availability-only - no data theft or tampering - and is confined to the minority of deployments that process untrusted HSS/LMS keys, a niche post-quantum capability, so the practical blast radius is narrow even though the CVSS score is high. Leadership should care because any internet-facing service in that subset can be taken offline repeatedly at trivial cost to the attacker, and there is no public exploit code or confirmed exploitation today, which makes this a patch-on-schedule issue rather than an emergency.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 67% exploitable
Prevalence
High
bc-csharp is a widely deployed general-purpose .NET cryptography library
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Medium
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2026-63569 CRITICAL
9.1 Oct 02

Crafted small-order or out-of-range Diffie-Hellman values passed to DHAgreement.CalculateAgreement in Bouncy Castle C# (

CVE-2026-63566 HIGH
8.7 Oct 02

Memory-exhaustion denial of service in the C# DTLS implementation of Bouncy Castle (bc-csharp) before 2.7.0 lets a remot

CVE-2026-63568 HIGH
8.7 Oct 02

Denial of service in Legion of the Bouncy Castle's C# cryptography library (bc-csharp) before 2.7.0 lets an unauthentica

CVE-2026-103600 HIGH
8.7 Oct 02

Uncontrolled recursion in Bouncy Castle C# (bc-csharp) before 2.7.0 allows unauthenticated remote attackers to crash or

CVE-2026-63574 HIGH
8.7 Oct 02

Denial of service in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows unauthenticated remote attackers to

CVE-2026-103604 HIGH
8.7 Oct 02

Denial of service in the Legion of the Bouncy Castle C# library (bc-csharp) affects all versions before 2.7.0, where qua

CVE-2026-16000 HIGH
8.7 Oct 02

Authentication-tag forgery in Legion of the Bouncy Castle Inc. bc-csharp (Bouncy Castle C#) before 2.7.0 lets a remote,

CVE-2026-63571 HIGH
8.7 Oct 02

Forged X.509 attribute certificates are accepted as valid by Legion of the Bouncy Castle Inc. bc-csharp versions before

CVE-2026-63567 HIGH
8.2 Oct 02

Observable padding discrepancy in the IES/ECIES decryption path of Bouncy Castle C# (bc-csharp) before 2.7.0 lets an una

CVE-2026-63573 HIGH
8.2 Oct 02

RSA PKCS#1 v1.5 key transport in the Bouncy Castle C# (bc-csharp) CMS implementation before 2.7.0 is vulnerable to a Ble

CVE-2026-103601 HIGH
8.2 Oct 02

Information disclosure in Bouncy Castle C# (bc-csharp) versions before 2.7.0 allows unauthenticated remote attackers to

CVE-2026-103602 HIGH
8.2 Oct 02

Certificates that should be rejected by PKIX name constraints are accepted by Legion of the Bouncy Castle Inc. bc-csharp

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy