SiteShadow
Back to vulnerability library

CWE-329 Not Using a Random IV with CBC Mode

What this means

SiteShadow flagged CBC-mode encryption that does not use a fresh, random IV for each encryption. Reusing or fixing IVs makes ciphertext patterns predictable and can leak information.

Why it matters

Predictable IVs weaken confidentiality and enable pattern leakage.

Safer examples

1) Prefer modern authenticated encryption modes

Use AES‑GCM / ChaCha20‑Poly1305 via a vetted library instead of rolling CBC manually.

2) If using CBC, generate a random IV per encryption

Store/transmit the IV alongside the ciphertext (IV does not need to be secret, but must be unpredictable).

3) Never reuse IVs with the same key

Treat IV generation as part of the encryption API; avoid custom IV handling.

How SiteShadow detects it (high level)

References

---

← Back to Vulnerability Library

Request access View coverage