1000-ft view: these demos show what not to do — storing plaintext/MD5 passwords, generating predictable tokens, saving PII without encryption, reusing IVs/nonces, and hard-coding keys with no rotation.
Compare with the Secure version.
Vulnerable idea: store passwords as plaintext or a fast hash like md5($pwd),
then compare directly (often with timing leaks).
Vulnerable idea: mint tokens with uniqid(), time(),
or mt_rand() — values are predictable and low entropy.
source='insecure'.Vulnerable idea: store SSNs/CCs directly in the DB with no encryption or authentication (no tags).
Vulnerable idea: use a fixed IV with the same key for AES-GCM. Identical plaintexts → identical ciphertexts; catastrophic on reuse.
Vulnerable idea: ship a single hard-coded key in source and never rotate.
No key_version; compromised key = lifetime breach.