Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-103601 Overview
CVE-2026-103601 is a cryptographic vulnerability in the Legion of the Bouncy Castle bc-csharp library affecting the Counter with CBC-MAC (CCM) and DSTU 7624 CCM Authenticated Encryption with Associated Data (AEAD) modes. The CcmBlockCipher and KCcmBlockCipher implementations write recovered plaintext into caller-supplied output buffers before verifying the authentication tag. When tag verification fails, the plaintext remains in that buffer. A remote attacker can submit forged ciphertexts and recover their plaintext if the application exposes the failed-decryption buffer through reuse, logging, or other side effects. The flaw is tracked as [CWE-354: Improper Validation of Integrity Check Value].
Critical Impact
Attackers can decrypt chosen ciphertexts by observing the output buffer of failed decryptions, breaking the confidentiality guarantees of CCM-mode AEAD.
Affected Products
- Legion of the Bouncy Castle Inc. bc-csharp versions prior to 2.7.0
- Applications using CcmBlockCipher with caller-supplied output buffers
- Applications using KCcmBlockCipher (DSTU 7624 CCM) with caller-supplied output buffers
Discovery Timeline
- 2026-10-02 - CVE-2026-103601 published to the National Vulnerability Database (NVD)
- 2026-10-02 - Last updated in NVD database
Technical Details for CVE-2026-103601
Vulnerability Analysis
The vulnerability stems from a violation of the AEAD contract in Bouncy Castle's CCM-mode implementations. CCM requires that decrypted plaintext never be released to the caller until the authentication tag has been verified. In the affected CcmBlockCipher and KCcmBlockCipher classes, the decryption routine writes recovered plaintext directly into the caller-supplied output buffer first, then checks the Message Authentication Code (MAC). When the MAC check fails, the method returns an error but leaves the plaintext in the buffer.
This behavior creates a chosen-ciphertext oracle. An attacker who can submit forged messages and later observe the contents of the output buffer, through logging, memory reuse, debug output, or shared allocations, can recover the plaintext of arbitrary ciphertexts. Only overloads that decrypt into a caller-supplied buffer are affected. Overloads that allocate and return a fresh array are not vulnerable.
Root Cause
The root cause is a release of unverified plaintext (CWE-354). The CCM decryption path performs block-level decryption and buffer writes before performing the final authentication tag comparison. The implementation does not zero the output buffer when the tag check fails, violating the "authenticate-then-decrypt-then-release" ordering expected of a correct AEAD implementation.
Attack Vector
Exploitation requires an application that lets an attacker submit arbitrary ciphertexts to a CCM or KCCM decryption routine using a caller-supplied output buffer, and that exposes the contents of that buffer when decryption fails. Common exposure channels include verbose error logging of buffer contents, buffer pooling or reuse across requests, serialization of partially populated response objects, and shared-memory IPC. The attack is network-reachable in services that expose authenticated decryption as part of a protocol handler.
// Patch excerpt from crypto/src/crypto/modes/GCMBlockCipher.cs
this.macBlock = null;
this.initialised = true;
- KeyParameter keyParam;
+ KeyParameter keyParameter = null;
#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER
ReadOnlySpan<byte> newNonce;
#else
Source: bc-csharp commit 4ddb1d0. The upstream fix set includes KCCM updates ported from bc-java and the authoritative patch in bc-csharp commit e086832.
Detection Methods for CVE-2026-103601
Indicators of Compromise
- Repeated decryption failures from the same client or session targeting CCM or KCCM endpoints
- Anomalous volumes of malformed ciphertext submissions followed by requests that read response buffers or logs
- Application error logs containing raw buffer contents after InvalidCipherTextException or MAC failure events
Detection Strategies
- Inventory .NET applications and dependencies for BouncyCastle.Cryptography or bc-csharp versions earlier than 2.7.0 using Software Composition Analysis (SCA) tooling
- Search source code for direct use of CcmBlockCipher, KCcmBlockCipher, and IAeadBlockCipher.DoFinal overloads that accept caller-supplied output buffers
- Review logging configurations for handlers that serialize decryption output buffers on exception paths
Monitoring Recommendations
- Alert on high rates of authenticated-decryption failures per client identity to detect oracle probing
- Monitor application telemetry for correlated patterns of failed decryptions followed by response-size or timing anomalies
- Ingest application and WAF logs into a central data lake and apply detection rules for repeated CCM MAC failures from a single source
How to Mitigate CVE-2026-103601
Immediate Actions Required
- Upgrade bc-csharp to version 2.7.0 or later across all .NET applications and build pipelines
- Audit code paths that call CCM or KCCM decryption into caller-supplied buffers and route them through newly allocated arrays as an interim measure
- Disable logging of raw buffer contents on decryption exception paths
- Rotate symmetric keys used with CCM or KCCM modes if there is evidence of oracle probing
Patch Information
The fix is included in bc-csharp 2.7.0. Review the upstream commits 4ddb1d0 and e086832, and the project advisory at the bc-csharp CVE-2026-103601 wiki.
Workarounds
- Use decryption overloads that return a newly allocated byte array instead of writing into a caller-supplied buffer
- Wrap CCM and KCCM decryption calls so the output buffer is explicitly zeroed when InvalidCipherTextException is thrown
- Substitute an alternative AEAD mode such as Galois/Counter Mode (GCM) where protocol flexibility allows
# Upgrade BouncyCastle.Cryptography to a fixed version in a .NET project
dotnet add package BouncyCastle.Cryptography --version 2.7.0
# Verify no transitive dependencies pin an older version
dotnet list package --include-transitive | grep -i bouncycastle
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

