CVE-2016-20013
Description
sha256crypt and sha512crypt through 0.6 allow attackers to cause a denial of service (CPU consumption) because the algorithm's runtime is proportional to the square of the length of the password.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
The SHA-256 and SHA-512 crypt algorithms through version 0.6 are vulnerable to CPU-based denial of service due to quadratic runtime scaling with password length.
Vulnerability
sha256crypt and sha512crypt through version 0.6 implement password hashing where the computational cost grows quadratically with the password length. Specifically, the algorithm's runtime is proportional to the square of the password length, allowing an attacker to cause excessive CPU consumption by providing a long password input. This affects all systems using these algorithms, as documented in the official specification [1]. The vulnerable versions are those up to and including 0.6 of the SHA-crypt specification.
Exploitation
An attacker can trigger a denial of service by submitting a password of sufficient length to any service or application that uses sha256crypt or sha512crypt for password hashing. No special authentication or network position is required; the attacker simply needs to supply a payload (a long password) to the hashing function. For example, sending a long password during login or account creation can cause the server to consume significant CPU resources while computing the hash, potentially exhausting available processing capacity.
Impact
Successful exploitation leads to a denial of service (CPU exhaustion) condition. The attacker causes the target system to spend excessive computing time on hashing a single password, which may degrade performance or render the system unresponsive for other users. There is no direct data confidentiality or integrity compromise; the impact is strictly on availability through resource starvation.
Mitigation
Not yet disclosed in the available references [1]. System administrators should check if their libcrypt or password hashing library provides a patched version that limits password length or implements a constant-time cost factor. If no updated library is available, a workaround is to restrict the maximum password length accepted by applications, thereby capping the CPU expenditure per request.
AI Insight generated on May 26, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
3- sha256crypt and sha512crypt/sha256crypt and sha512cryptdescription
- Range: <=0.6
- Range: <=0.6
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
3- akkadia.org/drepper/SHA-crypt.txtmitrex_refsource_MISC
- pthree.org/2018/05/23/do-not-use-sha256crypt-sha512crypt-theyre-dangerous/mitrex_refsource_MISC
- twitter.com/solardiz/status/795601240151457793mitrex_refsource_MISC
News mentions
0No linked articles in our index yet.