Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain on-path position on CMS traffic
-
DeliveryIntercept AES-CCM EnvelopedData message
-
ExploitSet CCMParameters aes-ICVlen to zero/out-of-range
-
ExecutionModify encrypted content payload
-
PersistVictim decryption skips real tag check
-
ImpactTampered plaintext accepted as authentic
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Integrity verification
|
| Exploitation Conditions | Exploitation requires an on-path (man-in-the-middle) attacker able to intercept and modify CMS EnvelopedData messages encrypted with AES-CCM (or AES-GCM), AND a victim application using vulnerable bc-csharp (before 2.7.0) to decrypt that content via CmsEnvelopedData/CmsEnvelopedDataParser or any caller passing an unchecked tag length into CcmBlockCipher for decryption. The concrete trigger is an attacker-supplied AlgorithmIdentifier whose CCMParameters set aes-ICVlen to zero or a value outside the RFC 5084 set {4,6,8,10,12,14,16}, which the pre-patch CcmParameters accepted unchecked. LIMITING FACTORS: the attacker must already hold a network interception position (no remote-from-anywhere access - hence AT:P); the flaw affects only the AEAD CCM/GCM CMS decryption paths, not all cipher usage; and the application must process the attacker-influenced AlgorithmIdentifier during decryption. No authentication is required (PR:N) and no user interaction is needed (UI:N). |
| Impact | This is a genuine integrity/tampering vulnerability rather than a high-CVSS paper tiger, but its exploitability is gated by a demanding precondition. The CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N, 8.2) is internally consistent with the description: the sole impact is integrity (VI:H), with no confidentiality (VC:N) or availability (VA:N) effect, and the AT:P 'attack requirements present' flag correctly reflects that the attacker must occupy an on-path/man-in-the-middle position to modify CCM-encrypted CMS content in transit. The high VI:H score is justified because defeating the AEAD authentication tag silently breaks the core guarantee of authenticated encryption - modified ciphertext decrypts as if valid. However, several real-world-risk signals temper this: EPSS is not provided, the vulnerability is NOT in CISA KEV, and no public exploit (POC) is indicated, so there is no evidence of active or opportunistic exploitation. Crucially, exploitation is not 'spray-and-pray' - it requires both an on-path adversary AND a victim application that decrypts attacker-influenced AES-CCM (or GCM) CMS EnvelopedData using the vulnerable bc-csharp paths. Note a tag/impact conflict: the input Tags label this 'Information Disclosure,' which directly contradicts the CVSS confidentiality metric (VC:N) - this is an integrity/tampering flaw, not a disclosure flaw. Net assessment: a credible, vendor-confirmed and patched cryptographic weakness worth prioritizing for any .NET application performing AES-CCM CMS decryption on untrusted input, but not an emergency mass-exploitation threat given the on-path requirement and absence of KEV/POC signals. |
| Exploit ScenarioDerived | An on-path attacker intercepting CMS EnvelopedData protected with AES-CCM crafts an AlgorithmIdentifier whose CCMParameters declare an authentication tag length (aes-ICVlen) of zero or another length outside the RFC 5084 set. Because CcmParameters accepted any value and CcmBlockCipher only validated tag length on encryption, the victim's bc-csharp decryption (via CmsEnvelopedData/CmsEnvelopedDataParser and ParameterUtilities.GetCipherParameters) compares against a zero-length or truncated tag, allowing the attacker to silently alter the encrypted payload without detection. No public exploit code is identified at time of analysis, and exploitation requires the attacker to already hold an on-path position. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 02, 2026
On-path attackers who can intercept and modify CMS messages can silently tamper with AES-CCM-protected content that Legion of the Bouncy Castle Inc.'s bc-csharp library (versions before 2.7.0) decrypts. The root cause is that CcmParameters accepted any aes-ICVlen value from an untrusted AlgorithmIdentifier while CcmBlockCipher enforced the tag length only on the encryption path, so a decryption carrying a zero-length or very short tag compared an empty or truncated tag and accepted forged ciphertext without any detectable integrity failure; the same fix also hardens the AES-GCM CMS parameter handling. The reachable paths are ParameterUtilities.GetCipherParameters as used by CmsEnvelopedData and CmsEnvelopedDataParser for AES-CCM EnvelopedData, plus any caller that forwards an unchecked tag length into CcmBlockCipher for decryption. A vendor patch is available in 2.7.0 and the change is published as two commits plus a wiki advisory; no public exploit code or confirmed in-the-wild exploitation was identified at time of analysis, and because exploitation requires an attacker to already hold a network interception position (no remote-from-anywhere access, no authentication, no user interaction), the practical risk is a genuine but precondition-gated integrity/tampering issue rather than a broadly exploitable one.
RemediationAI
Vendor-released patch: upgrade Legion of the Bouncy Castle Inc.'s bc-csharp to version 2.7.0 or later, which adds a ValidateIcvLen check (CCM: 4, 6, 8, 10, 12, 14, 16; GCM: 12-16) to CcmParameters and GcmParameters so that out-of-range aes-ICVlen values are rejected at parse and construction time rather than reaching the cipher; the fix is carried in commits 2818bdfa55efd58b0d6a1c75f360b8404d879780 and 9d284d8f379614def853b590c62bbb31c48f7af0 and documented at https://github.com/bcgit/bc-csharp/wiki/CVE-2026-15999. If an immediate upgrade is not possible, apply a targeted compensating control at the application boundary: before invoking CcmBlockCipher for decryption, validate the algorithm parameters yourself and reject any AES-CCM tag length that is not in {4, 6, 8, 10, 12, 14, 16} (or any AES-GCM length outside 12-16), ideally by inspecting the parsed CcmParameters/GcmParameters or the raw AlgorithmIdentifier - the trade-off being that this requires code changes in every decryption entry point and will reject legitimate messages only if the sender used a non-RFC 5084 length, which should never happen. For CMS EnvelopedData specifically, prefer AES-CBC or AES-GCM with a correctly validated tag length over AES-CCM until patched, and add an outer integrity mechanism (CMS SignedData over the EnvelopedData, or an application-level MAC/signature verified after decryption) so that tampering is detected even if the AEAD tag check is defeated - the trade-off is added processing and a dependency on signer key management. Because exploitation requires an on-path position, enforcing strong transport protection (TLS with certificate validation and no downgrade) raises the bar but must not be treated as a substitute for the patch, since the attack operates on the CMS layer rather than the transport. There is no indication that disabling CCM entirely is required for applications that never decrypt AES-CCM/AES-GCM CMS content, and no authentication or user interaction is needed by the attacker, so exposure is limited to deployments that accept attacker-influenced AlgorithmIdentifiers on those decryption paths.
Affected VersionsENISA
Affected Packages
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 vulnerability is CWE-354 (Improper Validation of Integrity Check Value) in the AEAD handling of the Bouncy Castle C
crypto library (CPE cpe:2.3:a:legion_of_the_bouncy_castle_inc.:bc-csharp:*:*:*:*:*:*:*:*). CMS EnvelopedData (RFC 5652) carries its content-encryption algorithm as an AlgorithmIdentifier; for AES-CCM and AES-GCM the parameters are defined by RFC 5084, which constrains AES-CCM-ICVlen to the set {4, 6, 8, 10, 12, 14, 16} and AES-GCM-ICVlen to {12, 13, 14, 15, 16}. Pre-patch, the ASN.1 parser and public constructor of CcmParameters stored whatever integer appeared in the sequence with no range or parity check, and CcmBlockCipher only validated the tag length when encrypting, not when decrypting; the decrypt path therefore compared a zero-length (or otherwise out-of-spec, very short) tag against the message, making the tag check trivially satisfiable. Because the parameters come from the attacker-controllable AlgorithmIdentifier of a CMS message, an on-path attacker can flip ciphertext bits and have the modification accepted as authentic, which is why the assessed impact is integrity-only (VC:N/VI:H/VA:N in CVSS 4.0; CVSS 3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N) - confidentiality is not broken, the attacker just cannot be detected. The referenced commit diff shows the corrective ValidateIcvLen helper being added to both CcmParameters (4-16, even values only) and GcmParameters (12-16), with new unit tests asserting that -1, 0, 2, 3, 5, 7, 9, 11, 13, 15, 17 and 18 are rejected for CCM. The flaw is confined to the AEAD CCM/GCM CMS decryption paths and to callers that pass an unchecked tag length to CcmBlockCipher; it does not affect every cipher use in the library, and the attacker must already occupy a network interception position, which is why the CVSS 4.0 vector carries AT:P.
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
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
AV:N and AC:H capture a network attacker who must occupy an on-path position; PR:N/UI:N as no auth or interaction needed; I:H for undetected tampering, with C:N/A:N since only integrity is affected.
Primary rating from Vendor (bcorg).
CVSS VectorVendor: bcorg
DescriptionCVE.org
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.
Executive ViewAI
Legion of the Bouncy Castle Inc.'s bc-csharp library (versions before 2.7.0) contains a high-severity integrity vulnerability that enables on-path attackers to silently tamper with AES-CCM protected CMS messages, directly impacting applications that rely on this library for secure data exchange. No public exploit identified at time of analysis, but successful exploitation could lead to undetected message modification, fraudulent transactions, or compliance violations. Leadership should prioritize upgrading to version 2.7.0 to restore integrity guarantees and protect sensitive business communications.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Crafted small-order or out-of-range Diffie-Hellman values passed to DHAgreement.CalculateAgreement in Bouncy Castle C# (
Memory exhaustion in Bouncy Castle C# (bc-csharp) before 2.7.0 allows a remote, unauthenticated attacker to cause a deni
Memory-exhaustion denial of service in the C# DTLS implementation of Bouncy Castle (bc-csharp) before 2.7.0 lets a remot
Denial of service in Legion of the Bouncy Castle's C# cryptography library (bc-csharp) before 2.7.0 lets an unauthentica
Uncontrolled recursion in Bouncy Castle C# (bc-csharp) before 2.7.0 allows unauthenticated remote attackers to crash or
Denial of service in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows unauthenticated remote attackers to
Denial of service in the Legion of the Bouncy Castle C# library (bc-csharp) affects all versions before 2.7.0, where qua
Authentication-tag forgery in Legion of the Bouncy Castle Inc. bc-csharp (Bouncy Castle C#) before 2.7.0 lets a remote,
Forged X.509 attribute certificates are accepted as valid by Legion of the Bouncy Castle Inc. bc-csharp versions before
Observable padding discrepancy in the IES/ECIES decryption path of Bouncy Castle C# (bc-csharp) before 2.7.0 lets an una
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
Information disclosure in Bouncy Castle C# (bc-csharp) versions before 2.7.0 allows unauthenticated remote attackers to
EUVD-2026-91204
GHSA-499v-wjw6-fvpx
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB