One optional flag on your validation call decides whether the holder actually proves they own the credential. Guess what a rushed caller passes.
What goes wrong
This credential format proves two things. The issuer signed it, and the party presenting it holds the private key it was bound to. That second check is what stops a stolen or copied credential from being replayed by someone else. Here it sits behind a boolean the caller supplies.
Pass the flag as false and the holder-binding proof is never checked. The function still returns a status that looks like success, because the issuer signature is fine. A caller who does not understand the flag, or an attacker who reaches a path that sets it off, gets a credential accepted with no proof the presenter owns it.
Security defaults belong to the library, not the caller. Turning off possession checking should be hard and loud, not a default someone flips without noticing. Make it a plain parameter with a permissive value and it will be off somewhere by accident, and that accident is an authentication bypass.
The pattern
function validate(credential, checkHolderBinding) {
verifyIssuerSignature(credential)
if (checkHolderBinding) {
verifyHolderProof(credential) // skipped when false
}
return VALID
}function validate(credential) {
verifyIssuerSignature(credential)
verifyHolderProof(credential) // always, no opt-out
return VALID
}
// must skip it? a separate, clearly named path with its own reviewGrounding 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.
Why it matters to you
A credential you accept without a possession check is a bearer token in disguise. Steal it once, from a backup or a shared device, and replay it forever. The signature keeps checking out because the issuer really did sign it. If your team trusts this validation result to log someone in, a leaked credential becomes an account takeover. Kill the opt-out, or make it impossible to reach on the default path.
Check your own code
- Find validation functions that take a boolean to enable or skip a security check.
- Make holder-binding and proof-of-possession non-optional on the default path.
- Search for callers passing false into any verification flag and justify each one.
- Confirm a valid result cannot come back with possession checking turned off.