Skip to main content

Bouncy Castle C# CVE-2026-63573

| EUVDEUVD-2026-91224 HIGH
Observable Discrepancy (CWE-203)
2026-10-02 bcorg GHSA-xx4m-xv2j-xx6g
8.2
CVSS 4.0 · Vendor: bcorg
View

Attack ChainAIDerived

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

  1. Access
    Capture RSA-encrypted CMS EnvelopedData message
  2. Delivery
    Submit many modified ciphertexts to oracle
  3. Exploit
    Distinguish padding-error from decryption-error responses
  4. Execution
    Iterate Bleichenbacher adaptive queries
  5. Persist
    Recover content-encryption key
  6. Impact
    Decrypt captured message content

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V6 - Authentication Timing-safe comparisons
Exploitation Conditions

Exploitation requires a specific confluence of conditions, not a default-configuration remote attack. The attacker must (1) already hold a captured CMS EnvelopedData message that uses RSA PKCS#1 v1.5 key transport (KeyTransRecipientInformation), and (2) have access to an application built on bc-csharp before 2.7.0 that decrypts attacker-submitted messages with the recipient's RSA private key and (3) exposes a distinguishable response between the 'bad padding in message' CmsException (invalid PKCS#1 padding rejected during UnwrapKey) and a later content-decryption failure. The attacker must also be able to send a large volume of adaptively modified ciphertexts. Limiting factors: the oracle only exists for legacy PKCS#1 v1.5 key transport (OAEP is unaffected); the application must leak the error discrepancy (timing or explicit error) for the oracle to be observable; the attack needs many queries, making rate limiting or logging a meaningful mitigation; and after 2.7.0 the constant-time fixed-length unwrap removes the oracle unless an operator explicitly re-enables the legacy path via the Org.BouncyCastle.Cms.AllowLenientRsaPkcs1 property.

Impact

This is a genuine but conditional cryptographic risk rather than a mass-exploitable flaw. The provided CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N) scores 8.2 (High) and correctly flags the key limiter via AT:P (Attack Requirements Present): the attacker must already possess a captured CMS EnvelopedData message AND have access to an application that acts as a decryption oracle leaking how decryption failed. No EPSS score was supplied, so statistical exploitation likelihood cannot be quantified. There is no CISA KEV listing and no public exploit was identified in the provided intelligence, so per policy this is 'no public exploit identified at time of analysis' - this is not confirmed active exploitation. CWE-203 (observable discrepancy) matches the root cause precisely: invalid PKCS#1 v1.5 padding throws a distinct 'bad padding in message' CmsException instead of substituting a random key, creating a Bleichenbacher padding oracle. The signals are internally consistent - high confidentiality impact (VC:H) with no integrity/availability impact (VI:N/VA:N) aligns with a message-recovery attack. The practical gating factor is the AT:P requirement: a passive library consumer with no distinguishable error disclosure and no attacker-submitted-ciphertext path is not realistically exploitable, so real priority should be scoped to applications that decrypt untrusted CMS messages and expose differential failure behavior.

Exploit ScenarioDerived

An attacker captures a CMS EnvelopedData message protected with RSA PKCS#1 v1.5 key transport and then repeatedly submits adaptively modified copies to a service (e.g. a decryption/validation endpoint) that unwraps them with the recipient's RSA private key and returns distinguishable errors. By observing which ciphertexts trigger the distinct 'bad padding in message' CmsException versus a later content-decryption failure, the attacker runs a Bleichenbacher adaptive chosen-ciphertext attack to recover the content-encryption key and decrypt the original message. No public proof-of-concept exploit was identified in the provided data, and the attack requires many queries plus an observable error-discrepancy oracle.

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

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

Alert me

AnalysisAIv1 – Oct 02, 2026

RSA PKCS#1 v1.5 key transport in the Bouncy Castle C

(bc-csharp) CMS implementation before 2.7.0 is vulnerable to a Bleichenbacher-style adaptive chosen-ciphertext attack that can recover the content-encryption key - and hence the plaintext - of a captured CMS EnvelopedData message. The observable discrepancy is that a key-transport ciphertext with invalid PKCS#1 v1.5 padding is rejected inside KeyTransRecipientInformation.UnwrapKey with a distinct 'bad padding in message' CmsException, instead of being silently replaced by a random key, so a malformed ciphertext can be distinguished from a well-padded one that only fails later during content decryption. The attack is unauthenticated (PR:N in both the CVSS 4.0 and the assessed CVSS 3.1 vectors) but highly conditional: the attacker must already hold a captured message, must have access to an application that decrypts attacker-submitted messages with the recipient's RSA private key, and must be able to observe the padding-versus-content error distinction across a very large number of adaptively modified ciphertexts - no public exploit code was identified at time of analysis, and the vendor fixed the issue in 2.7.0.

RemediationAI

Vendor-released patch: upgrade to bc-csharp 2.7.0, which contains the constant-time fixed-length RSA PKCS#1 v1.5 unwrap; the corresponding upstream changes are commits 85679cc7023adf4e2a0650b88a1f4f98679c7463 and c38b4790e2aef68f116a551f73b94ea05cb5590c, with the vendor advisory at https://github.com/bcgit/bc-csharp/wiki/CVE-2026-63573. After upgrading, ensure the legacy path remains disabled - do not set Org.BouncyCastle.Cms.AllowLenientRsaPkcs1 to true (the default is false), because that property deliberately reinstates the padding oracle for content ciphers with no fixed key size (RC2, RC4, CAST5 and similar); the trade-off is that recipients encrypted under those legacy variable-length ciphers with RSA PKCS#1 v1.5 transport will now fail to unwrap with a CmsException, so applications depending on them must migrate to a fixed-length content cipher (AES, ARIA, Camellia, DES/3DES, IDEA or SEED) or another key-transport mode. Where upgrading is not immediately possible, the most effective compensating controls are: migrate CMS recipients from rsaEncryption key transport to RSA-OAEP, which is not affected by this oracle (trade-off: re-issuing recipient info breaks interoperability with peers pinned to PKCS#1 v1.5); neutralize the oracle at the application layer by returning a single uniform error and uniform response timing for all CMS decryption failures so padding failures are indistinguishable from content-decryption failures (trade-off: harder diagnosis and requires careful constant-time error handling, and it does not protect applications that leak the underlying exception type or text); strictly rate-limit and alert on repeated CMS decryption failures per client and per recipient key (trade-off: adds latency or blocks legitimate retry traffic, and slows but does not fully eliminate a determined attacker); and monitor or rotate any RSA recipient private key whose decryption endpoint has been exposed to untrusted ciphertext, since a successful attack yields the captured message's content-encryption key and plaintext. No vendor-released patch status other than 2.7.0 should be assumed for this CVE.

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

CMS EnvelopedData with RSA key transport (KeyTransRecipientInformation) encrypts a symmetric content-encryption key (CEK) to the recipient under RSA PKCS#1 v1.5 and carries it in a KeyTransRecipientInfo structure; the recipient unwraps that ciphertext with its RSA private key. CWE-203 (Observable Discrepancy) captures the root cause: the unwrap path in bc-csharp returned a distinguishable failure for PKCS#1 v1.5 padding errors rather than applying the standard constant-time/implicit-rejection defense (substituting a random key of the expected length and letting decryption fail uniformly), which is exactly the padding-oracle precondition exploited by Bleichenbacher's 1998 attack and its many descendants. The identifying CPE, cpe:2.3:a:legion_of_the_bouncy_castle_inc.:bc-csharp:*, scopes the flaw to the C

port of Bouncy Castle rather than other language ports. The upstream fix reframes the problem around key-length predictability: GeneratorUtilities.TryGetFixedKeySize now consults a deliberately conservative whitelist of single-length algorithms (AES128/192/256, ARIA128/192/256, CAMELLIA128/192/256, DES, DESEDE3, IDEA, SEED) and, when one of those is the content algorithm, performs a constant-time RSA PKCS#1 v1.5 decrypt to a fixed output length (RsaPkcs1Utilities.DecryptToFixedLength) before building the key parameter. Ciphers with genuinely variable-length keys (RC2, RC4, CAST5 and similar) cannot be safely bounded this way, so they now throw a CmsException by default unless the operator explicitly opts back into the legacy unwrap via the Org.BouncyCastle.Cms.AllowLenientRsaPkcs1 property, which the code comments explicitly flag as reinstating the padding oracle. Note that the CVSS 4.0 vector carries AT:P (Attack Requirements: Present), which is the vector's way of encoding the captured-message plus observable-oracle preconditions, and that the authoritative independent reassessment rates the same flaw as CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N - high complexity, confidentiality-only, with no integrity or availability impact; that assessment is the ceiling for impact claims here.

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.2 HIGH
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
vuln.today AI 5.9 MEDIUM

Network-reachable oracle (AV:N) but adaptive chosen-ciphertext attack needing many queries and a leaked error discrepancy makes it AC:H; no auth to query the oracle (PR:N); only message confidentiality is lost (C:H, I/A:N).

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

Primary rating from Vendor (bcorg).

CVSS VectorVendor: bcorg

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

DescriptionCVE.org

Observable discrepancy in the CMS RSA PKCS#1 v1.5 key-transport unwrap (KeyTransRecipientInformation.UnwrapKey) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows a remote attacker who holds a captured CMS EnvelopedData message, and who can submit many modified messages to an application that decrypts them with the recipient's RSA private key and reveals how decryption failed, to recover the captured message's content-encryption key and so its content, via a Bleichenbacher-style adaptive chosen-ciphertext attack, because a key-transport ciphertext with invalid PKCS#1 v1.5 padding is rejected during unwrap with a distinct "bad padding in message." CmsException instead of being replaced by a random key, so it can be told apart from a correctly padded ciphertext, which fails only later at content decryption.

Executive ViewAI

Why It Matters

A cryptographic weakness in Bouncy Castle's C

CMS library (bc-csharp) prior to version 2.7.0 can let an attacker who already holds an intercepted encrypted message recover its plaintext, undermining the confidentiality of any CMS EnvelopedData handled by applications built on the library. Leadership should care because this component is typically embedded inside third-party products, internal signing and messaging services, and custom .NET applications, so exposure is likely spread across teams and vendors rather than concentrated in one system, and exploitation depends on an externally reachable service decrypting attacker-supplied data with an RSA private key. The practical consequence is disclosure of sensitive message content wherever RSA PKCS#1 v1.5 key transport is used without the fixed release.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 79% exploitable
Prevalence
High
popular .NET cryptography library, broad ecosystem use
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.3%
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
No
Human Impact
High
Technical Impact
Partial

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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-103603 HIGH
8.7 Oct 02

Memory exhaustion in Bouncy Castle C# (bc-csharp) before 2.7.0 allows a remote, unauthenticated attacker to cause a deni

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-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