CWE-326, Inadequate Encryption Strength, describes a product that stores or transmits sensitive data using an encryption scheme that is theoretically sound but not strong enough for the level of protection required.
The algorithm is not necessarily broken. The parameters, such as key length, are too small, or the scheme is too old for today's attack resources.
How it happens
Short keys are the classic case. Code written years ago used what looked adequate then. Compute got cheaper, the key size stayed, and the margin disappeared. Another cause is copying a configuration from a legacy system because it needs to stay compatible.
# Risky: tiny key space
key = os.urandom(7) # 56 bits
MITRE states it directly: a weak encryption scheme can be subjected to brute force attacks that have a reasonable chance of succeeding using current attack methods and resources. The observed examples, CVE-2001-1546, CVE-2004-2172 (weak encryption open to a chosen plaintext attack) and CVE-2002-1682, are all weak encryption. CVE-2002-1697 notes weak encryption that produced the same ciphertext from the same plaintext blocks.
What an attacker gains
The record lists confidentiality and access control impact: the attacker may be able to decrypt the data using brute force, bypassing the protection that encryption was meant to provide.
How to find it
Static analysis can flag some cases, for example key generation with short lengths or deprecated parameter sets. Review every place you configure ciphers, key sizes or TLS settings, and compare them to current guidance from standards bodies.
How to fix it
MITRE's mitigation is to use an encryption scheme that is currently considered strong by experts in the field. In practice:
- Pick a mainstream, well reviewed algorithm and a key size that current guidance recommends.
- Read the guidance on a schedule. Strength recommendations change.
- Keep the algorithm and size in configuration so they can change without a rewrite.
- Plan data migration. Old data encrypted with a weak scheme must be re-encrypted, not just new data.
Quick check
How is this different from using a broken algorithm?
A broken algorithm has a flaw in its design. Here the design is fine, but the strength setting is too low. See CWE-327 for the broken algorithm case.