🚫 A02:2021 – Cryptographic Failures


Imagine you're sending a confidential letter through the mail. But instead of sealing it in a proper envelope, you just fold the paper and tie it with thread, thinking no one will peek.
Along the way, a postal worker opens it, copies the contents, and reseals it. You never realize your private message was compromised.
That’s exactly what cryptographic failures look like in the digital world.
đź§© What Are Cryptographic Failures?
Shifting up to #2 in the OWASP Top 10, Cryptographic Failures refer to problems in the protection of sensitive data, usually caused by weak, missing, or misused encryption.
It was previously known as "Sensitive Data Exposure", but renamed to highlight the root cause — broken or poorly implemented cryptography.
📌 Real-World Examples:
Storing passwords in plain text instead of hashing them securely.
Exposing sensitive data (like personal info) in URLs, logs, or error messages.
Not using HTTPS, allowing attackers to intercept traffic.
🚨 Why Is It Dangerous?
Leads to data breaches
Causes account takeovers
Enables identity theft
Damages brand reputation and user trust
🛡️ How to Prevent It:
Encrypt all sensitive data, especially passwords and financial info
Use HTTPS everywhere (TLS 1.2 or higher)
Never log passwords, access tokens, or full credit card numbers
Use secure algorithms like AES-256, Argon2, etc.
Manage encryption keys securely (don't hardcode them)
âś… In Short:
Cryptography is only secure if it's done right.
Don’t just wrap your secrets in string—seal them with strong encryption!
In the next blog, we’ll explore Injection Attacks — one of the most well-known yet dangerous vulnerabilities in web applications.
Stay tuned to learn how attackers exploit inputs — and how you can defend your apps from them.
Subscribe to my newsletter
Read articles from Kohsheen Razdan directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
