Use this when MD5 shows up in a system and you must decide whether it is a security risk.
MD5
MD5 produces a 128-bit hash and is broken for security, since collisions can be created easily. It is only acceptable as a non-security checksum, not for passwords or signatures.
1. MD5 is broken (collisions trivial).
2. Never for security, passwords or signatures.
3. OK only as non-adversarial checksum.
4. Replace in protocols and code.
5. Old password hashes must be migrated.
MD5 → collisions trivial
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Finding MD5 use Verify boundary
- Search code for
md5(,MessageDigest.getInstance("MD5"),hashlib.md5. - Check password databases for 32-hex-character hashes without salt.
openssl x509 -textformd5WithRSAEncryptionsignatures.- Network: RADIUS (MD5 in the protocol — see BlastRADIUS, 2024) and CHAP still rely on MD5; protect with RadSec/IPsec.
Step 2 Common mistakes Narrow the fault
- MD5 for integrity against attackers.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Broken for security.
- Fine as a non-security checksum.
- Never for passwords or signatures.
md5sum file— (non-security checksums only)grep -r -i md5 <code>— find security uses- Replacement plan — SHA-256
ReferenceWhy it matters1 section · depth on demand
Status
Collisions can be produced in seconds, and the Flame malware used an MD5 collision to forge a Microsoft code-signing certificate. Use MD5 only as a non-security checksum (detecting accidental corruption). Replace it in password storage, signatures, certificates, RADIUS/TACACS shared-secret derivations where possible, and HMAC-MD5 in new configurations.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
MD5 produces a 128-bit digest and is thoroughly broken: collisions can be generated in seconds, and it has been used to forge certificates. It must not be used for security purposes.
Acceptable remaining uses are limited to non-adversarial checks, such as detecting accidental file corruption where an attacker cannot influence the data, or legacy compatibility where a stronger hash is also verified.
Replace MD5 in:
Where MD5 is still acceptable
Only for non-security checks such as detecting accidental corruption or deduplication where no attacker can choose input. Never for passwords, signatures, certificates or file integrity against tampering. Flame malware (2012) used an MD5 collision to forge a Microsoft code-signing certificate.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Hashing → MD5. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://csrc.nist.gov/pubs/fips/180-4/upd1/final · confidence 94%