1591
hash functions with very little computing overhead. Note that using these functions can have an
impact on performance, so they require special consideration to avoid denial-of-service attacks.
However, their configurability provides finer control over how much CPU and memory is used, so
it could be adjusted to suit the environment's needs.
Effectiveness = High
Phase: Implementation
If a technique that requires extra computational effort can not be implemented, then for each
password that is processed, generate a new random salt using a strong random number
generator with unpredictable seeds. Add the salt to the plaintext password before hashing it.
When storing the hash, also store the salt. Do not use the same salt for every password.
Effectiveness = Limited
Be aware that salts will not reduce the workload of a targeted attack against an individual hash
(such as the password for a critical person), and in general they are less effective than other
hashing techniques such as increasing the computation time or memory overhead. Without a
built-in workload, modern attacks can compute large numbers of hashes, or even exhaust the
entire space of all possible passwords, within a very short amount of time, using massivelyparallel
computing and GPU, ASIC, or FPGA hardware.
Observed Examples
Reference Description
CVE-2008-4905 Blogging software uses a hard-coded salt when calculating a password hash.
https://www.cve.org/CVERecord?id=CVE-2008-4905
CVE-2002-1657 Database server uses the username for a salt when encrypting passwords,
simplifying brute force attacks.
https://www.cve.org/CVERecord?id=CVE-2002-1657
CVE-2001-0967 Server uses a constant salt when encrypting passwords, simplifying brute force
attacks.
https://www.cve.org/CVERecord?id=CVE-2001-0967
CVE-2005-0408 chain: product generates predictable MD5 hashes using a constant value
combined with username, allowing authentication bypass.
https://www.cve.org/CVERecord?id=CVE-2005-0408
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 958 SFP Secondary Cluster: Broken Cryptography 888 2398
MemberOf 1346 OWASP Top Ten 2021 Category A02:2021 -
Cryptographic Failures
1344 2488
MemberOf 1402 Comprehensive Categorization: Encryption 1400 2527
Notes
Maintenance
As of CWE 4.5, terminology related to randomness, entropy, and predictability can vary widely.
Within the developer and other communities, "randomness" is used heavily. However, within
cryptography, "entropy" is distinct, typically implied as a measurement. There are no commonlyused
definitions, even within standards documents and cryptography papers. Future versions of
CWE will attempt to define these terms and, if necessary, distinguish between them in ways that
are appropriate for different communities but do not reduce the usability of CWE for mapping,
understanding, or other scenarios.
References
CWE Version 4.14
CWE-761: Free of Pointer not at Start of Buffer
CWE-761: Free of Pointer not at Start of Buffer