CVE-2026-63573: Bouncy Castle RSA PKCS#1 v1.5 padding oracle in CMS key-transport

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

Bouncy Castle is a cryptographic library used in .NET applications to encrypt and decrypt sensitive data. This vulnerability allows an attacker who intercepts encrypted messages to recover their contents through a padding oracle attack—by submitting many modified messages and observing how decryption fails, the attacker can deduce the encryption key. This could lead to exposure of sensitive data protected by the library.

Technologies: Legion of the Bouncy Castle BouncyCastle.Cryptography. Vendors: Legion of the Bouncy Castle.

Quick answers

Is CVE-2026-63573 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-63573 being exploited in the wild.
How severe is CVE-2026-63573?
Informational severity, published 2 October 2026.
Which products and versions are affected?
Legion of the Bouncy Castle BouncyCastle.Cryptography before 2.7.0.
Is there a fix for CVE-2026-63573?
Yes: fixed in BouncyCastle.Cryptography 2.7.0. Until then: Set the property CmsAllowLenientRsaPkcs1 (via "Org.BouncyCastle.Cms.AllowLenientRsaPkcs1") to false (the default), which rejects content-encryption algorithms with variable key sizes and prevents the attack. For applications requiring legacy behavior, this property can be set to true, but doing so reintroduces the vulnerability. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-63573 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-63573?
Check whether you run Legion of the Bouncy Castle 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

Set the property CmsAllowLenientRsaPkcs1 (via "Org.BouncyCastle.Cms.AllowLenientRsaPkcs1") to false (the default), which rejects content-encryption algorithms with variable key sizes and prevents the attack. For applications requiring legacy behavior, this property can be set to true, but doing so reintroduces the vulnerability.

Technical details

A Bleichenbacher-style adaptive chosen-ciphertext attack exists in the CMS RSA PKCS#1 v1.5 key-transport unwrap implementation (KeyTransRecipientInformation.UnwrapKey) before version 2.7.0. Invalid PKCS#1 v1.5 padding is rejected with a distinct exception ("bad padding in message" CmsException) instead of being replaced by a random key, allowing an attacker with a captured CMS EnvelopedData message to distinguish valid from invalid padding and recover the content-encryption key through repeated decryption attempts. The fix implements constant-time processing and uses random-key fallback for invalid padding.

Affected products

  • Legion of the Bouncy Castle BouncyCastle.Cryptography before 2.7.0

Timeline

  • 2026-07-27: patched: Fix committed to bc-csharp repository
  • 2026-10-02: advisory: CVE-2026-63573 published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.