HACKORY
Language · English
← All cases
HACKORY / Real-world cases

Capital One: the server that was made to fetch its own keys

A misconfigured firewall in the cloud let an outsider use a Capital One server to reach data on about 106 million people.

New here? Try the first lesson without an account

Company or project

Capital One

When

Access: 22–23 Mar 2019 · detected: 19 Jul 2019

Reference

No CVE: a configuration error

Severity and scale

About 106 million people

Real-world cases

The story

On 17 July 2019, an outside researcher told Capital One, through its responsible disclosure program, that it had a configuration vulnerability. Two days later, the bank confirmed that an outsider had got in on 22 and 23 March and taken data from credit card applications. The FBI arrested the person responsible, and in 2022 a United States jury found her guilty.

The term, explained simply

Imagine a receptionist who runs errands: “bring me the envelope from that office”. If they do not check where you send them, you can ask them to go into internal offices you are not allowed into. That is SSRF (server-side request forgery): getting a server to send requests to places someone else chose. In the cloud it is more dangerous, because every server has a metadata service nearby: an internal desk that tells it who it is and hands it temporary credentials, like borrowed keys, to use other services.

The root cause

According to the U.S. Department of Justice charges, a misconfigured web application firewall let outside requests reach a Capital One server in the cloud, and that server ended up handing over the credentials of its role, which opened folders with data. Two U.S. senators described the technique as SSRF in a letter to the FTC.

What could happen

Data on about 100 million people in the United States and about 6 million in Canada was exposed, mostly from card applications made between 2005 and early 2019. According to Capital One, no card numbers or passwords were compromised, and less than 1% of Social Security numbers were exposed.

How it was fixed and how to prevent it

Capital One fixed the configuration immediately and worked with the authorities. To prevent it: the server may only send requests to destinations on an allow list; each cloud role has the minimum permission (IAM); and the metadata service requires an extra step. In November 2019, AWS introduced IMDSv2, a version of its metadata service that first asks for a session token, as an additional defense against SSRF and misconfigured firewalls.

Practice it in Hackory

Sources

Official documents and the researcher’s own write-up. We tell the story, the concept and the defense; there are no steps to repeat the attack.