——
HighVULNERABILITIES

Cryptographic failures: when protected data is not protected

Cryptographic failures expose data because encryption, key management, transport protection, or algorithm choices do not match the threat.

For teams protecting sensitive data in transit, at rest, in backups, and in application workflows.

OWASP A04EncryptionKeys

Start with the situation, not the slogan

A vulnerability is not made useful by giving it a dramatic name. It becomes useful when a team can identify the affected trust boundary, reproduce the unsafe behaviour safely, explain the consequence, and verify that the correction changes the result. Cryptographic failures: when protected data is not protected is therefore treated here as an engineering condition rather than a badge for a dashboard.

Severity depends on exposure, reachable functionality, data, privilege and compensating controls. A scanner can point at a door; it cannot reliably tell you who can reach it, what is behind it, or whether the hinges are decorative. Start with the system’s intended rule, then compare that rule with observed behaviour.

Encryption is a system of algorithms, keys, identities, storage, rotation, and failure handling. A strong algorithm cannot compensate for exposed keys or plaintext copies.

How this usually reaches the desk

A useful review begins when a tester can state an expectation and an observation in the same sentence. The expectation is the documented boundary; the observation is recorded as “Sensitive fields appear in logs, analytics, exports, caches, URLs, or temporary files.” The next task is not to launch a larger bag of payloads. It is to reproduce the smallest authorised case, capture the request and result, and identify where the missing decision should have been made.

This scenario combines common operational patterns; it is not presented as a report of one named incident.

What to look for

Begin with preserved, comparable evidence. One signal is rarely proof; use independent observations and a reliable timeline before declaring scope or intent.

01

Sensitive fields appear in logs, analytics, exports, caches, URLs, or temporary files.

Translate this clue into a testable condition: actor, resource, operation and expected denial or safe handling. Preserve the smallest request and response that demonstrate the difference.

02

Deprecated protocols, weak configurations, certificate errors, or inconsistent transport enforcement.

Check whether the behaviour exists in source, configuration, generated artefacts and the deployed service. Many splendid fixes have lived only in a branch while production carried on with its own arrangements.

03

Keys are embedded in code, shared broadly, never rotated, or stored beside encrypted data.

Measure reach and consequence. Determine which roles, tenants, records, secrets or processes are exposed, and whether an existing control genuinely prevents abuse or merely makes it less convenient.

Run it, read it, decide what changes

These examples use documentation addresses, test identities and bounded targets. Replace placeholders only inside systems you own or are explicitly authorised to operate. Read the expected result and next action before running the command; a successful command is evidence, not yet a conclusion.

Example 01

Inspect TLS protocol and certificate

OpenSSLLinux, macOS or WSL
Prerequisites
An owned hostname.
shell
host=www.example.com
openssl s_client -connect "$host:443" -servername "$host" -tls1_2 </dev/null
openssl s_client -connect "$host:443" -servername "$host" -tls1_3 </dev/null
Expected result

Each supported handshake prints certificate and negotiated cipher information; unsupported versions fail.

How to interpret it

Handshake failure can be a network or client issue. Supporting TLS 1.2 is not inherently weak; cipher and application context matter.

Next action

Test from a second current client, remove obsolete protocols in staging, and monitor compatibility during rollout.

Example 02

Check the certificate currently served

OpenSSLLinux, macOS or WSL
Prerequisites
A TLS hostname and outbound TCP/443 access.
shell
host=www.example.com
openssl s_client -connect "$host:443" -servername "$host" </dev/null 2>/dev/null |
  openssl x509 -noout -subject -issuer -serial -dates -ext subjectAltName
Expected result

The live certificate identity, issuer, serial, dates and subject names are printed.

How to interpret it

A valid certificate proves control of a validation path at issuance time, not that the website or DNS is trustworthy now.

Next action

Compare the serial and names with certificate-provider records and investigate unexpected issuance through the CA and DNS audit trails.

Example 03

Prove the old credential no longer works

Provider API clientAny cloud or SaaS provider
Prerequisites
A harmless read-only endpoint and the revoked credential held only in a private local variable.
shell
OLD_TOKEN='replace-locally-never-commit'
curl -sS -o /dev/null -w '%{http_code}\n'   -H "Authorization: Bearer $OLD_TOKEN" https://api.example.invalid/v1/me
unset OLD_TOKEN
Expected result

A revoked bearer token should receive an authentication failure such as HTTP 401; the documentation host here must be replaced with the real provider endpoint.

How to interpret it

HTTP 403 can mean the token is valid but lacks permission; a network error proves nothing. Use the provider’s documented harmless identity endpoint.

Next action

Record the revocation evidence, test the replacement through the application, and search audit logs from exposure time onward.

What to do

Read the whole sequence before starting. Several workstreams may run in parallel, but their evidence, authority and expected outcomes still need to be explicit. Every step below points back to a concrete example; use the example as implementation evidence, not as permission to operate outside the stated scope.

  1. 01

    Classify sensitive data and trace every place it is collected, transmitted, stored, copied, backed up, and deleted.

    Define the security property in plain language before changing code. If the team cannot say what must always be true, it cannot write a convincing regression test for it.

    Working example 01: Inspect TLS protocol and certificate — OpenSSL on Linux, macOS or WSL.

  2. 02

    Use current platform and library defaults rather than designing custom cryptography.

    Reproduce with the least dangerous input in an isolated or explicitly authorised environment. Record version, configuration, identity and expected result so another engineer can verify the finding.

    Working example 02: Check the certificate currently served — OpenSSL on Linux, macOS or WSL.

  3. 03

    Centralise key generation, storage, access control, rotation, backup, and destruction in an approved service.

    Fix the decision at the authoritative layer. Client-side checks, hidden buttons and polite documentation are helpful interface features, but they are not enforcement boundaries.

    Working example 03: Prove the old credential no longer works — Provider API client on Any cloud or SaaS provider.

  4. 04

    Remove plaintext copies and prevent sensitive values from entering logs or URLs.

    Add tests for allowed, denied and malformed cases. Include adjacent roles and objects, because vulnerabilities are sociable creatures and seldom respect the exact example in the original ticket.

    Working example 01: Inspect TLS protocol and certificate — OpenSSL on Linux, macOS or WSL.

  5. 05

    Test certificate, key rotation, restore, and failure paths—not only the happy path.

    Deploy with monitoring and a rollback plan, then repeat the original case against the actual release. Evidence from a local build does not certify the service your users can reach.

    Working example 02: Check the certificate currently served — OpenSSL on Linux, macOS or WSL.

Operational judgement

Prioritisation should combine likelihood, consequence and exposure. Internet reachability, valuable data, privileged execution and a reliable abuse path all raise urgency. Strong isolation, narrow permissions or a disabled feature may lower immediate risk, but document those assumptions and test them. A numerical score is useful shorthand; it is not a substitute for knowing which business process can be harmed.

A durable remediation usually has three layers: remove the immediate unsafe path, improve the design or default that allowed it, and add a signal that reveals recurrence. For OWASP A04, Encryption and Keys, this often means aligning application behaviour, deployment configuration and operational monitoring rather than asking one patch to perform a small miracle.

Make the result useful to the next person

Write the finding so an engineer can act without translating theatre into requirements. Include affected component and version, actor and preconditions, smallest safe reproduction, expected rule, observed result, consequence, evidence, and the owner of remediation. Keep secret values and personal data out of the ordinary ticket. If disclosure to a vendor or maintainer is required, use their published security channel and agree on what may be shared before placing proof in a public issue tracker.

The handover to remediation should begin with “Classify sensitive data and trace every place it is collected, transmitted, stored, copied, backed up, and deleted.” and preserve the exact case needed to prove “Test certificate, key rotation, restore, and failure paths—not only the happy path.” Link code and configuration changes to that test. Record whether the remedy eliminates the unsafe state or merely narrows exposure, and name any compensating control. A reviewer should be able to answer three questions without calling the original tester: what was wrong, why this change is sufficient, and how production will demonstrate the corrected behaviour.

Validate before you close

Confirm data remains protected across production, backups, support workflows, exports, and observability systems, and that key access is logged and limited.

Capture the test, the expected result and the observed result. Where a person or business owner must accept restored service, name them in the record. A green dashboard can confirm that a component is answering; it cannot confirm that invoices, identities or restored data are trustworthy.

Finish with a compact closure note: the original trigger, confirmed scope, evidence retained, controls changed, tests passed, known gaps, residual risk, and the people responsible for the remaining work. Schedule a review while the timeline is still fresh enough to challenge. The purpose is not to find a person to blame; computers already perform blame with admirable efficiency. The purpose is to make the next response faster, safer and less dependent on one person remembering where the useful log was hidden.

Common mistakes

  • Treating a scanner result as proof without confirming the affected path and version.
  • Applying a tactical patch while leaving the underlying design weakness in place.
  • Testing production with exploit code before establishing an authorised, isolated validation plan.

These errors usually come from haste, unclear ownership or misplaced confidence. Build the safeguard into the runbook: a required evidence field, a second-person review, a rollback test or a specific exit criterion.

Questions people ask when the clock is running

Is a scanner result enough to open a critical incident?

It is enough to triage. Confirm the affected version and reachable path, reproduce safely, and measure privilege and data impact. A false positive and a missed exposure are both easier to manage when the evidence is explicit.

Can a compensating control count as the fix?

Sometimes, for a defined period. It must be enforced, monitored, owned and tested against the same abuse case. Write down its expiry or review date so “temporary” does not become a geological era.

What proves remediation?

Confirm data remains protected across production, backups, support workflows, exports, and observability systems, and that key access is logged and limited. Keep the original test as a regression case and verify the deployed system, not merely the ticket status.

Safety boundary

Use these steps only on systems you own or are explicitly authorised to assess. Preserve evidence, follow your organisation’s legal and regulatory obligations, and prefer reversible actions when the situation is not yet understood.

Primary references

  1. OWASP Top 10:2025OWASP
  2. Cryptographic Storage Cheat SheetOWASP

Editorial status: first edition. Review the linked vendor documentation for product- and version-specific changes before acting.