Cryptography is what ensures CIA of data and modern cryptographic techniques convert plan text into ciphertext that can be decoded with a key. Cryptographic failure is simply a web application vulnerability that exposes data due to weak or non-existent cryptographic algorithm.
Cryptographic failure occurs for numerous reasons like missing encryption, improper key management, outdated algorithm, outdated padding methods, using insecure IVs and more.
Security analysts should use online web application security protect (OWASP) that enumerates measures to prevent cryptographic implementation defects in modern applications. Most common measures are discarding unused data, disabling caching for responses, cataloging all data processed by the application, using appropriate IV and more.