Security Playbook
← All breaches
2019Capital One

Capital One: SSRF to cloud credentials to S3

A misconfigured web application firewall could be tricked into making requests on the attacker's behalf. It fetched the cloud instance's metadata, which handed out temporary credentials for a role that could read far more storage than it needed.

ImpactData of about 100 million people in the US and 6 million in Canada, mostly credit card applications. Regulators later fined the bank $80 million.

Attack chain

  1. 1
    Misconfigured WAF makes requests for the attacker

    A crafted request made the firewall server fetch an internal URL: server-side request forgery.

  2. 2
    Instance metadata returns role credentials

    http://169.254.169.254 answered with temporary keys for the server's IAM role. The old metadata service needed no token.

  3. 3
    The role could list and read many buckets

    A firewall has no business reading customer data, but its role was allowed to.

  4. 4
    Data copied out

    Bucket contents were downloaded using the stolen credentials from outside the company.

Nothing stopped it: breach

Controls that were missing

Lessons

  • 01Any component that fetches URLs can become an SSRF; that includes security products.
  • 02Cloud metadata is a credential vending machine: lock it down.
  • 03Least privilege decides whether an SSRF is a bug or a breach.

Based on public reports

  • · US Department of Justice, criminal complaint, United States v. Paige Thompson (2019)
  • · Office of the Comptroller of the Currency, consent order against Capital One (2020)
Next: SolarWinds: a backdoor shipped as a signed update →

Check your understanding

1 of 3

What vulnerability started the Capital One breach?