49 vulnerabilities classified as CWE-328 (可逆的单向哈希). AI Chinese analysis included.
CWE-328 represents a cryptographic weakness where software employs hash algorithms that fail to meet modern security standards, rendering them vulnerable to preimage, second preimage, and birthday attacks. Attackers typically exploit this flaw by reversing the hash to discover original inputs or generating collisions to bypass authentication mechanisms, effectively compromising data integrity and confidentiality. This vulnerability often arises when developers use legacy algorithms like MD5 or SHA-1 for security-critical tasks such as password storage or digital signatures. To mitigate this risk, developers must transition to robust, collision-resistant algorithms such as SHA-256 or SHA-3. Additionally, implementing salted hashing techniques further strengthens security by ensuring identical inputs produce distinct outputs, thereby neutralizing rainbow table attacks and preventing adversaries from easily determining original values through computational brute force.
unsigned char *check_passwd(char *plaintext) { ctext = simple_digest("sha1",plaintext,strlen(plaintext), ... ); //Login if hash matches stored hash if (equal(ctext, secret_password())) { login_user(); } }String plainText = new String(plainTextIn); MessageDigest encer = MessageDigest.getInstance("SHA"); encer.update(plainTextIn); byte[] digest = password.digest(); //Login if hash matches stored hash if (equal(digest,secret_password())) { login_user(); }Vulnerabilities classified as CWE-328 (可逆的单向哈希) represent 49 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.