Weak hashing library (MD5) detected
- Rule ID: java_lang_weak_hash_md5
- Languages: java
- Source: weak_hash_md5.yml
A weak hashing library can lead to data breaches and greater security risk.
According to OWASP, MD5 is considered a weak hashing algorithms and therefore shouldn't be used.
❌ Avoid libraries and algorithms with known weaknesses:
MessageDigest md = MessageDigest.getInstance("MD5");
✅ Use stronger encryption algorithms when storing data.
MessageDigest md = MessageDigest.getInstance("SHA-256");
OWASP Top 10
To skip this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --skip-rule=java_lang_weak_hash_md5
To run only this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --only-rule=java_lang_weak_hash_md5
Ready to take the next step? Learn more about Bearer Cloud.