Blog / A10:2021 Server-Side Request Forgery
A10:2021 · Server-Side Request Forgery

A substring match on service name opened an SSRF

Match a service name with contains instead of equals and a caller can pick services you never meant to reach, then make your server call them.

caller suppliesservice namematched bysubstringextra servicesselectedserver POSTs toeach addressATTACKER INPUTIMPACTinternal service reached
Attack path · caller supplies service name → matched by substring → extra services selected → server POSTs to each address

Match a service name with contains instead of equals and a caller can pick services you never meant to reach, then make your server call them.

What goes wrong

A config server takes a service name from the caller and looks up the matching registered service. The bug is one word: it matches with contains instead of equals. Supply a short substring and you match several services at once, including ones you were never meant to name.

Each matched service has an address, discovered dynamically, that the config server will POST to as a trusted internal client. So the caller can select a whole set of internal targets by giving a substring that appears in each, and the server makes a privileged request to every address it resolved.

This is SSRF with a routing bug attached. The attacker decides which internal services get hit by choosing how loose their substring is.

The pattern

Vulnerable
matched = registry.filter(s => s.name.contains(input));
for (svc of matched) {
  post(svc.discoveredUrl, payload);  // privileged internal call
}
Hardened
svc = registry.find(s => s.name === input);
if (!svc) {
  return reject('unknown service');
}
post(svc.discoveredUrl, payload);
How the pipeline adjudicated itPROVEN
ABCDEFGH

Every gate held. The exploit path was reproduced against a negative control, the impact was calibrated, and the finding was signed report-ready.

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

Why it matters to you

Loose matching on an identifier is a quiet way to widen a trust boundary. You meant to look up one thing by name. Loose matching (contains, an unanchored regex, whatever was convenient) turns 'find this service' into 'find anything shaped like this,' and when the thing you found is a URL your server will call, that is a pivot into your internal network.

Check your own code