bc-csharp: Improper integrity check in AES-CCM decryption
Summary
bc-csharp, the .NET port of the Bouncy Castle cryptographic library, does not validate the authentication tag length when decrypting AES-CCM data. An on-path attacker who can modify a message can remove its integrity protection and change the encrypted content, which is then returned as if it had been verified. The issue applies when the tag length comes from data an attacker can modify, for example CMS EnvelopedData encrypted with AES-CCM. Confidentiality is not affected.
Affected
- bc-csharp versions 2.6.2 and earlier, and 2.7.0-beta.98
- Exposed when AES-CCM parameters from untrusted messages are used for decryption (for example CmsEnvelopedData, CmsEnvelopedDataParser, ParameterUtilities.GetCipherParameters or CcmBlockCipher)
Fixed in
- bc-csharp 2.7.0 or later
Workaround
- Where an upgrade is not immediately possible, check the tag length before decrypting AES-CCM data taken from a message.
- Reject any tag length other than the one the application expects, or at least anything outside 4 to 16 octets in steps of 2.
Exploitation
- CISA SSVC assessment: exploitation none, not automatable, partial technical impact.
- No known exploitation in the wild and no public proof of concept at the time of research.
Our recommendation
- Check .NET projects and container images for bc-csharp (BouncyCastle.Cryptography) versions below 2.7.0.
- Upgrade to 2.7.0 or later with the next build.
- Until then, validate tag lengths for AES-CCM decryption of data from untrusted sources.
- Monitor the vendor wiki and NVD for updates.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- Vendor advisory (bc-csharp wiki) github.com
- Fix commit 2818bdfa (validate ICV length) github.com
- Fix commit 9d284d8f (check CCM tag length on decryption) github.com
- Bouncy Castle C# download and release notes www.bouncycastle.org
- OSV entry CVE-2026-15999 osv.dev
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 17:33.
Original description (NVD)
Improper validation of integrity check value in the AES-CCM implementation (CcmParameters and CcmBlockCipher) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows an on-path attacker to modify CCM-encrypted content without detection via an AlgorithmIdentifier whose CCMParameters declare an authentication tag (aes-ICVlen) of zero or another length outside the RFC 5084 set, because CcmParameters accepted any value and CcmBlockCipher validated the tag length only when encrypting, so decryption compared a zero-length or very short tag. Affected paths include ParameterUtilities.GetCipherParameters, used by CmsEnvelopedData and CmsEnvelopedDataParser for EnvelopedData encrypted with AES-CCM, and any caller passing an unchecked tag length to CcmBlockCipher for decryption.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
