CWEweakness
CWE-329 Generation of Predictable IV with CBC Mode
Medium
Official page ↗
- Abstraction
- Variant
- Structure
- Simple
- Status
- Draft
- Likelihood of exploit
- Medium
- Languages
- Not Language-Specific
- CWE version
- 5.0
Description
The product generates and uses a predictable initialization Vector (IV) with Cipher Block Chaining (CBC) Mode, which causes algorithms to be susceptible to dictionary attacks when they are encrypted under the same key.
Extended description
CBC mode eliminates a weakness of Electronic Code
Book (ECB) mode by allowing identical plaintext blocks to
be encrypted to different ciphertext blocks. This is
possible by the XOR-ing of an IV with the initial plaintext
block so that every plaintext block in the chain is XOR'd
with a different value before encryption. If IVs are
reused, then identical plaintexts would be encrypted to
identical ciphertexts. However, even if IVs are not
identical but are predictable, then they still break the
security of CBC mode against Chosen Plaintext Attacks
(CPA).
Common consequences
• Confidentiality: Read Application Data — If the IV is not properly initialized, data that is encrypted can be compromised and leak information.
Potential mitigations
• [Implementation] NIST recommends two methods of generating unpredictable IVs for CBC mode [REF-1172]. The first is to generate the IV randomly. The second method is to encrypt a nonce with the same key and cipher to be used to encrypt the plaintext. In this case the nonce must be unique but can be predictable, since the block cipher will act as a pseudo random permutation.
Detection methods
• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Observed examples
• CVE-2020-5408: encryption functionality in an authentication framework uses a fixed null IV with CBC mode, allowing attackers to decrypt traffic in applications that use this functionality
• CVE-2017-17704: messages for a door-unlocking product use a fixed IV in CBC mode, which is the same after each restart
• CVE-2017-11133: application uses AES in CBC mode, but the pseudo-random secret and IV are generated using math.random, which is not cryptographically strong.
• CVE-2007-3528: Blowfish-CBC implementation constructs an IV where each byte is calculated modulo 8 instead of modulo 256, resulting in less than 12 bits for the effective IV length, and less than 4096 possible IV values.
• CVE-2011-3389: BEAST attack in SSL 3.0 / TLS 1.0. In CBC mode, chained initialization vectors are non-random, allowing decryption of HTTPS traffic using a chosen plaintext attack.
Related
Observed example · CVE (5)
- CVE-2020-5408 Spring Security versions 5.3.x prior to 5.3.2, 5.2.x prior to 5.2.4, 5.1.x prior to 5.1.10, 5.0.x prior to 5.0.16 and 4.2.x prior to 4.2.16… vulnerability
- CVE-2017-17704 A door-unlocking issue was discovered on Software House iStar Ultra devices through 6.5.2.20569 when used in conjunction with the IP-ACM… vulnerability
- CVE-2017-11133 An issue was discovered in heinekingmedia StashCat through 1.7.5 for Android, through 0.0.80w for Web, and through 0.0.86 for Desktop. vulnerability
- CVE-2011-3389 The SSL protocol, as used in certain configurations in Microsoft Windows and Microsoft Internet Explorer, Mozilla Firefox, Google Chrome,… vulnerability
- CVE-2007-3528 The blowfish mode in DAR before 2.3.4 uses weak Blowfish-CBC cryptography by (1) discarding random bits by the blowfish::make_ivec function… vulnerability
Child of · CWE (2)
Referenced by CVE · weakness (14)
- CVE-2025-59322 CPSD CryptoPro Secure Disk for Bitlocker before v7.7.4 fails to properly handle decryption errors and allows encrypted volumes to be… vulnerability
- CVE-2024-56141 Minosoft is an open-source, multi-version Minecraft Java Edition client written in Kotlin. vulnerability
- CVE-2026-14969 A flaw was found in 389-ds-base where the LDBM backend attribute encryption uses a hardcoded static initialization vector for AES-CBC and… vulnerability
- CVE-2026-45787 electerm is an open-sourced terminal/ssh/sftp/telnet/serialport/RDP/VNC/Spice/ftp client. vulnerability
- CVE-2024-49783 IBM OpenPages with Watson 8.3 and 9.0 could provide weaker than expected security in storage of encrypted data. vulnerability
- CVE-2025-2814 Crypt::CBC versions between 1.21 and 3.05 for Perl may use the rand() function as the default source of entropy, which is not… vulnerability
- CVE-2022-46397 FP.io VPP (Vector Packet Processor) 22.10, 22.06, 22.02, 21.10, 21.06, 21.01, 20.09, 20.05, 20.01, 19.08, and 19.04 Generates a Predictable… vulnerability
- CVE-2022-29054 A missing cryptographic steps vulnerability [CWE-325] in the functions that encrypt the DHCP and DNS keys in Fortinet FortiOS version… vulnerability
- CVE-2021-27499 Ypsomed mylife Cloud, mylife Mobile Application, Ypsomed mylife Cloud: All versions prior to 1.7.2, Ypsomed mylife App: All versions prior… vulnerability
- CVE-2020-5408 Spring Security versions 5.3.x prior to 5.3.2, 5.2.x prior to 5.2.4, 5.1.x prior to 5.1.10, 5.0.x prior to 5.0.16 and 4.2.x prior to 4.2.16… vulnerability
- CVE-2017-3225 Das U-Boot is a device bootloader that can read its configuration from an AES encrypted file. vulnerability
- CVE-2017-3226 Das U-Boot is a device bootloader that can read its configuration from an AES encrypted file. vulnerability
- CVE-2014-3566 The SSL protocol 3.0, as used in OpenSSL through 1.0.1i and other products, uses nondeterministic CBC padding, which makes it easier for… vulnerability
- CVE-2008-5161 Error handling in the SSH protocol in (1) SSH Tectia Client and Server and Connector 4.0 through 4.4.11, 5.0 through 5.2.4, and 5.3 through… vulnerability