Cryptographic Failures

Sensitive data exposed because cryptography is missing, weak, or misused.

A04:2025 · High severity · Updated November 6, 2026

What it is

Cryptographic Failures moves down from A02:2021 to A04:2025. The category covers any path by which sensitive data is exposed because of inadequate cryptographic protection. Manifestations include missing encryption in transit or at rest, weak algorithms (DES, MD5, SHA-1 for passwords), hardcoded cryptographic keys, weak or predictable random number generation, and improper key management. The consequences of disclosure are often immediate and unrecoverable: leaked passwords cannot be unleaked.

Common patterns

  • Hashing passwords with fast algorithms (MD5, SHA-256) instead of bcrypt, argon2, or scrypt.
  • AES with ECB mode (visible patterns) or CBC without HMAC (padding oracle vulnerabilities).
  • Math.random or other non-cryptographic PRNGs used for tokens, session IDs, or salts.
  • HTTP endpoints transmitting credentials, tokens, or PII without TLS.

What Deva detects

Deva matches algorithm and mode constructors across language ecosystems and flags use of broken or unsuitable primitives in security contexts. The scanner runs high-confidence regex detectors for AWS keys, Stripe tokens, GitHub PATs, Slack tokens, and private keys. Error-handling rules flag handlers that return stack traces or exception details to clients.

CWE detection guides

Real-world examples

YearIncidentWhat happened
2017Equifax (147M records)Sensitive consumer data was exfiltrated in part because credentials were stored unencrypted on internal systems and an expired certificate left encrypted traffic uninspected. Initial access was via an unpatched Apache Struts vulnerability, but the impact was amplified by failures downstream.
2022LastPass (encrypted vault leak)Encrypted password vaults were exfiltrated from a backup. Vault contents were protected by user master passwords, though website URLs were not encrypted. Master passwords with weak entropy and old (pre-2018) hashing iterations remained crackable offline.

Compliance framework impact

These educational references describe control topics, including frameworks Deva does not currently offer for evaluation. CMMC evaluation and SPRS scoring are unavailable. See the FAQ for supported frameworks and preview status. Code-level findings support an assessment; they do not certify compliance.

  • NIST 800-53 SC-13 Cryptographic Protection, IA-5 Authenticator Management
  • PCI-DSS v4.0.1 Req 3.6 Cryptographic keys secured, Req 8.3.2 Strong cryptography
  • HIPAA 164.312(a)(2)(iv) Encryption and Decryption, 164.312(e)(2)(ii) Encryption in transit
  • FedRAMP SC-13 Cryptographic Protection
  • GDPR Article 32 (pseudonymization, encryption)

Related glossary terms