CanonicalSecurity
Weak crypto (CWE-327/338): no MD5/SHA-1 for passwords, no Math.random() for tokens
MD5 and SHA-1 are fast hashes, built for integrity checks, not for passwords — they are brute-forced at billions of guesses per second on commodity GPUs. Use bcrypt/argon2/scrypt for passwords, and crypto.randomBytes / secrets.token_hex for anything security-sensitive like tokens or session ids.
securitycryptographycwe-327