Home / Vulnerability Database / Swift : Weak hashing algorithm
Swift

Swift : Weak hashing algorithm

Overview

The used hash function is insecure. Its use can lead to a data confidentiality loss.

Insufficient Cryptography vulnerabilities take the fifth place in the “OWASP Mobile Top 10 2016” mobile application vulnerabilities ranking.

The MD2, MD5, SHA1 hash functions have known vulnerabilities. Finding collisions for MD2 and MD5 functions does not require substantial resources; the similar problem for SHA1 is likely to be solved in the near future. If these functions are used to store valuable information (such as passwords), its confidentiality can be violated.

The hash function used to store passwords not only should be resistant to collisions but also should not be too fast. This complicates the attack by exhaustive search. For this purpose specialized hash functions have been developed: PBKDF2, bcrypt, scrypt.

Suppose that user passwords are stored on the server in encrypted form with the use of insecure hash function (e.g., MD5). A possible attack scenario:

  1. The attacker gets access to the encrypted passwords.
  2. An attacker exploits a vulnerability of hashing algorithm and calculates the string for which the hash algorithm gives the same value as for the user’s password.
  3. The attacker passes the authentication using a calculated string.
CRITICAL

DerScanner Severity Score

Do you want to fix Swift : Weak hashing algorithm in your application?

See also

Swift

Swift : Nill password

Swift

Swift : Hardcoded salt

Swift

Swift : Undocumented feature: special account