Blog / A07:2021 Identification and Authentication Failures
A07:2021 · Identification and Authentication Failures

A fresh cipher on null defeats the whole prompt

When the biometric prompt returns success with no bound crypto handle, the callback makes a new one and runs the protected action anyway. The binding is gone.

prompt returnssuccessbound cryptohandle is nullcallback createsa fresh oneaction runs withan unbound handleATTACKER INPUTIMPACTcheck absent
Attack path · prompt returns success → bound crypto handle is null → callback creates a fresh one → action runs with an unbound handle

When the biometric prompt returns success with no bound crypto handle, the callback makes a new one and runs the protected action anyway. The binding is gone.

What goes wrong

The prompt can hand your callback nothing, and the callback will fill in the blank itself. Tying a cryptographic operation to a biometric prompt only means something if the operation runs through the exact handle the prompt authorized. That handle is the binding. Break it and "biometric success" becomes a boolean you can reach other ways.

This callback treats the bound handle as optional. When it comes back null, the code manufactures a brand-new one and hands that to the protected action. The new handle was never authenticated by the prompt, so the action runs on a key the user never authorized in this exchange. If authentication was ever started without a bound handle, or the platform returns null for any reason, the substitute sails straight through.

The pattern

Vulnerable
function onSuccess(result) {
  // result.cryptoHandle is the one the prompt actually authorized
  let handle = result.cryptoHandle
  if (handle == null) handle = newCryptoHandle()   // not authenticated
  performProtectedAction(handle)
}
Hardened
function onSuccess(result) {
  const handle = result.cryptoHandle
  if (handle == null) {
    abort("no authenticated crypto handle")   // never fabricate one
    return
  }
  performProtectedAction(handle)
}
How the pipeline adjudicated itHELD
ABCDEFGH

Grounding and reachability were confirmed. The exploit-path gate would not conclude without the calling code, so the finding was held and an evidence request was raised instead of being reported as fact.

Ed25519 · per-tenant signing key · gate ledger A–H · verify offline against the published payload hash

Why it matters to you

On paper the user authenticated. In reality the operation ran on a key the authentication never touched. That gap is what auditors and attackers both look for in biometric flows, because it downgrades a hardware-backed guarantee into a UI event.

Never synthesize the thing that was supposed to be handed to you. If the prompt did not return a bound handle, the correct outcome is failure, not a freshly minted stand-in.

Check your own code