# Capital One Breach > The 2019 Capital One incident: an SSRF against a misconfigured EC2-hosted WAF reached IMDSv1, exfiltrated the instance role's S3 data (~100M credit applications), and became the reference case for cloud metadata credential theft. ## What happened A misconfigured ModSecurity WAF running on an EC2 instance was abused as an SSRF primitive: it relayed attacker requests to the EC2 **Instance Metadata Service v1** at `http://169.254.169.254`. IMDSv1 answers a plain unauthenticated GET, so three HTTP requests were enough — no exploit, no memory-corruption bug: 1. `GET /latest/meta-data/iam/security-credentials/` → the instance role name. 2. `GET /latest/meta-data/iam/security-credentials/<role>` → temporary `AccessKeyId`/`SecretAccessKey`/`Token`. 3. Replay those credentials against AWS S3. The instance role had permissions to **list and sync S3 buckets** holding the credit-card application data, so the stolen temporary credentials turned a web-layer SSRF into bulk data exfiltration. The WAF being the SSRF sink is the detail to remember when a vendor proposes a WAF rule as the fix — the control that failed was the control being sold. ## Impact - ~**106 million** individuals affected (~100M US, ~6M Canada). - Exposed: ~**1,000,000 Canadian SINs**, ~**140,000 US Social Security Numbers**, ~**80,000 bank account numbers**, plus credit-application PII. - **$80M** OCC civil money penalty (2020); **$190M** class-action settlement (2021). ## Why it's the canonical cloud SSRF case It fixed in the industry's mind that SSRF severity in the cloud is set by the identity behind the fetcher, not the response body: an over-scoped instance profile made a "read a URL" bug into account-level data access (MITRE ATT&CK T1552.005). It directly drove adoption of **IMDSv2** (released 2019 as the AWS defense-in-depth response) and the "disable IMDSv1 / require token / hop limit 1" guidance now standard. Wikipedia lists it alongside the 2021 Microsoft Exchange (ProxyLogon) SSRF chain as the two landmark SSRF incidents. ## Still relevant GreyNoise observed a **coordinated SSRF exploitation surge on 2025-03-09** (~400 IPs hitting ~10 SSRF CVEs simultaneously, often preceded by Grafana path-traversal recon) and explicitly framed it as an echo of Capital One — IMDSv1-reachable hosts remain targeted at scale. The F5 Labs March 2025 EC2 campaign (see [[Cloud Metadata Service Exploitation]]) shows the same `?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/` pattern automated against any EC2-hosted site that still exposes IMDSv1. ## Lessons / remediation - The fix is a **network/identity control, not a regex**: require IMDSv2, disable IMDSv1, set hop limit 1, or `HttpEndpoint=disabled` where metadata is unneeded. - **Scope instance/task roles tightly** — the blast radius is exactly what that role can touch. - Don't rely on alerts that only fire when stolen keys are replayed from outside the provider; an attacker inside the same cloud evades them. - See [[SSRF Prevention]] for resolve-then-pin, egress proxying and segmentation. ## Related - [[Server-Side Request Forgery]] - [[Cloud Metadata Service Exploitation]] - [[IMDSv2]] - [[SSRF Prevention]] - [[Out-of-Band Detection]] ## Sources - [[raw/greynoise.io/new-ssrf-exploitation-surge-echoes-2019-capital-one-breach-3315|New SSRF Exploitation Surge Serves as a Reminder of 2019 Capital One Breach]] - [[raw/en.wikipedia.org/server-side-request-forgery-wikipedia-2635|Server-side request forgery - Wikipedia]] - [[raw/agentoffense.com/ssrf-cloud-metadata-attacks-url-fetcher-to-iam-credentials-15332|SSRF Cloud Metadata Attacks: URL Fetcher to IAM Credentials]] - [[raw/yassineaboukir.com/exploitation-of-an-ssrf-vulnerability-against-ec2-imdsv2-3260|Exploitation of an SSRF vulnerability against EC2 IMDSv2]] - [[raw/application.security/capital-one-ssrf-kontra-application-security-training-95|Capital One SSRF — Kontra Application Security Training]] - [[raw/f5.com/campaign-targets-amazon-ec2-instance-metadata-via-ssrf-3230|Campaign Targets Amazon EC2 Instance Metadata via SSRF]] - [[raw/x.com/tl-dr-imdsv1-ssrf-credenziali-iam-gratis-capital-one-2019-106m-record-2702|TL;DR: IMDSv1 SSRF = IAM credentials — Capital One 2019]]