CVE-2026-16001: IesEngine stream-mode MAC forgery via length-dependent KDF split
Exposure of the message authentication key through the encryption keystream in the stream mode of IesEngine (an IesEngine constructed without a block cipher) in Legion of the Bouncy Castle Inc. bc-csharp before 2.7.0 allows a remote attacker who has observed one encrypted message with known plaintext to forge shorter messages of their choosing that the recipient accepts as authentic, via a crafted ciphertext and MAC tag, because the MAC key was taken from the key derivation output directly after a keystream as long as the message, while the derivation input depends only on the static key pair and fixed parameters. The keystream revealed by that one message therefore contains the MAC key for every sufficiently shorter message.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
bc-csharpto a version that resolves this vulnerability.Fixed in 2.7.0
Event History
Frequently Asked Questions
Which deployments are exposed?
Deployments using the stream-mode variant of IesEngine, meaning an IesEngine constructed without a block cipher, are affected in bc-csharp versions before 2.7.0. The issue does not describe exposure for IesEngine instances constructed with a block cipher.
What does an attacker need to exploit this?
An attacker needs to observe one encrypted message for which the plaintext is known. They can then use the revealed keystream material to forge crafted ciphertexts and MAC tags for sufficiently shorter messages.
What can an attacker do after exploiting the issue?
The attacker can create shorter messages of their choosing that the recipient accepts as authentic. The described impact is message forgery rather than decryption of arbitrary messages.
Is patching the only stated remediation?
The affected versions are identified as bc-csharp versions before 2.7.0. The provided data does not state a workaround or mitigation for systems that cannot immediately upgrade.