Weak hashing library (MDx) detected

Description

A weak hashing library can lead to data breaches and greater security risk.

Remediations

According to OWASP, MD5 is considered a weak hashing algorithms and therefore shouldn't be used.

❌ Avoid libraries and algorithms with known weaknesses:

  $encrypted = md5($input)

✅ Use stronger encryption algorithms when storing data.

  $encrypted = hash('sha256', $input)

Associated CWE

OWASP Top 10

Configuration

To skip this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --skip-rule=php_lang_weak_hash_md

To run only this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --only-rule=php_lang_weak_hash_md

Ready to take the next step? Learn more about Bearer Cloud.