Medium severityGoCryptographyMEDIUM confidence
Weak Hash MD5 SHA1
MD5 and SHA-1 are cryptographically broken (CWE-327/CWE-328) and must not be used for passwords, signatures, or integrity of security-relevant data.
Standards mapping
- OWASP Top 10
- A02:2021 - Cryptographic Failures
- OWASP ASVS
- V6.2.1 (L2)
Vulnerable vs. safe
Flagged by this check
_ = md5.New()Passes - the safe pattern
_ = sha256.New()Why it matters & how to fix it
MD5 and SHA-1 are cryptographically broken (CWE-327/CWE-328) and must not be used for passwords, signatures, or integrity of security-relevant data. For passwords use a memory-hard KDF (golang.org/x/crypto/bcrypt, argon2, or scrypt); for integrity/signatures use SHA-256 or SHA-3. MD5/SHA-1 are only acceptable for non-security checksums (e.g. cache keys).
References
Rule ID integsec-go-weak-hash-md5-sha1 - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentestRelated checks
- JavaScript / TypeScript - CryptographyInsecure Randomness For Secrets
- JavaScript / TypeScript - CryptographyWeak Cipher Algorithm
- JavaScript / TypeScript - CryptographyWeak Hash Algorithm
- Python - CryptographyInsecure Random Token
- Python - CryptographyWeak Cipher DES ECB
- Python - CryptographyWeak Hash MD5 SHA1