Blog / A08:2021 Software and Data Integrity Failures
A08:2021 · Software and Data Integrity Failures

Returning a Credential You Never Verified

Your service calls a backend, gets a credential-shaped response, and returns it as issued. If that hop is ever tampered with, you just handed out a forgery.

service callsbackendresponse receivedover networktreated as issuedcredentialreturned withoutverificationforged credentialpassed onATTACKER INPUTIMPACTtrust boundary crossed
Attack path · service calls backend → response received over network → treated as issued credential → returned without verification → forged credential passed on

Your service calls a backend, gets a credential-shaped response, and returns it as issued. If that hop is ever tampered with, you just handed out a forgery.

What goes wrong

The code makes an outbound call and takes whatever comes back as the finished credential. It returns that to its own caller without checking the signature, without confirming the expected issuer and subject, and without checking that the credential matches the request that was made. The network response is trusted on faith.

TLS protects the hop while it is intact. It does nothing if the backend is compromised, if a proxy in the middle is hostile, or if the endpoint you are calling is not the one you think. In any of those cases the response can carry a credential an attacker crafted, and your service passes it along with your name on it.

A credential is a signed claim. The only thing that makes it trustworthy is verifying that signature and its binding at the point you accept it. Fetching it over a secure channel is transport, not verification. Those are different jobs, and one does not cover for the other.

The pattern

Vulnerable
function fetchCredential(req) {
  let resp = http.exchange(backendUrl, req)   // network response
  return resp.body                            // returned as-is
}
Hardened
function fetchCredential(req) {
  let resp = http.exchange(backendUrl, req)
  let cred = resp.body
  verifySignature(cred, issuerKey)   // prove it was issued
  checkBinding(cred, req)            // prove it matches the request
  requireSubjectAndIssuer(cred)
  return cred
}
How the pipeline adjudicated itDISPROVEN
ABCDEFGH

Grounding and reachability checked out, then the exploit-path gate failed to stand up. The pipeline recorded the finding as disproven and signed that result, so the same false alarm will not come back next quarter.

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

Why it matters to you

If you emit credentials your callers rely on, you are vouching for them. Skip verification and you become a laundering step: an attacker who can influence one backend response gets a forged credential blessed by your service. The check is a few lines. The trust you extend by skipping it reaches everyone downstream who accepts what you hand out.

Check your own code