AI Security · 6 min read · Updated

7 Real-World Breaches and the Security Lessons They Teach

Vulnerability classes feel abstract until you see what they cost. Here are seven well-documented breaches, how each one happened, and the specific controls that would have prevented or limited the damage.

Real world breaches chain

SQL injection, SSRF, and broken access control can sound like textbook terms until you see the headlines they produce. Studying real incidents connects each vulnerability class to its consequences, and it reveals a pattern that repeats almost every time.

The goal here is not to blame anyone. Every one of these organizations employed capable people, and similar failures happen everywhere. The goal is to learn. These summaries rely on public reporting, official investigations, and the organizations’ own disclosures.

How to read a breach

For each incident, ask the same six questions:

  1. Initial access: how did the attacker get in?
  2. Escalation: how did a foothold become broad access?
  3. Detection: how long did it go unnoticed, and what revealed it?
  4. Impact: what data, systems, and people were affected?
  5. Root causes: what process or design failures made it possible?
  6. Lessons: what would have prevented, limited, or detected it?

Most serious breaches are a chain: an initial weakness, a lack of internal barriers, and slow detection. Break any link and the damage shrinks.

1. Equifax (2017): the unpatched framework

Attackers exploited a remote code execution flaw (CVE-2017-5638) in the Apache Struts framework on an online dispute portal, an expression language injection in a crafted Content-Type header. A patch had been out for about two months. Inside, attackers found plaintext credentials that opened many databases, and they took data on roughly 147 million people. An expired certificate on a traffic inspection device meant encrypted traffic was not being inspected. Once it was renewed, the activity was spotted almost immediately, about 76 days after the intrusion began.

Lessons: know where every framework runs so you can patch fast; use least privilege and a secrets manager to limit blast radius; and monitor your monitoring, because a control that silently fails is worse than one you know is missing.

2. Capital One (2019): SSRF to cloud credentials

According to court documents, the attacker used server-side request forgery through a misconfigured web application firewall to reach the cloud metadata service and obtain the instance role’s temporary credentials. That role could read a large number of storage buckets, exposing data on about 100 million people in the US and 6 million in Canada. The breach was discovered through the company’s responsible disclosure program.

Lessons: SSRF plus metadata is a classic chain, so enforce protections like AWS IMDSv2; a firewall never needs read access to customer data; and disclosure programs genuinely work.

3. MOVEit Transfer (2023): SQL injection at scale

A criminal group exploited an unknown SQL injection flaw (CVE-2023-34362) in a widely used file transfer product, installed web shells, and stole files. By automating the attack across every exposed server, they hit thousands of organizations and exposed data on tens of millions of people, many of them affected indirectly through vendors.

Lessons: SQL injection is not solved; infrastructure products that concentrate sensitive data are prime targets; third-party risk is your risk; and once exploitation goes public, defenders have days, not weeks.

4. Optus (2022): the unauthenticated API

Public reporting described an internet-facing API that required no authentication and returned customer records by an identifier reported to be incrementing. Personal data of roughly 9.8 million current and former customers was affected.

Lessons: every API that returns records by ID must authenticate the caller and authorize each object; inventory every endpoint, including test and legacy ones; and expect regulators to take notice.

5. 23andMe (2023): credential stuffing meets a sharing feature

Attackers used passwords reused from other breaches to log into about 14,000 accounts. Because of an opt-in feature for connecting with genetic relatives, those accounts could see information about millions of others. The company reported that data relating to roughly 6.9 million people was accessed.

Lessons: credential stuffing has well-known defenses (MFA, breached password checks, bot detection); features define blast radius, so threat-model what one compromised account can reach; and monitor data access, not just logins.

6. British Airways (2018): the poisoned script

Attackers modified a JavaScript file loaded on the airline’s site and payment pages so it copied card details to a lookalike domain. The UK Information Commissioner’s Office found that data of about 429,000 customers and staff was affected and fined the airline 20 million pounds. It was one of many “Magecart” card-skimming attacks.

Lessons: client-side code is attack surface, since any script on a payment page can read what users type; use Subresource Integrity, a strict CSP with connect-src limits, and script change monitoring; and protect front-end deployment access as carefully as back-end code.

7. SolarWinds (2020) and Codecov (2021): the build pipeline

In SolarWinds, a state-sponsored group compromised the build environment and inserted a backdoor into legitimately signed updates installed by around 18,000 customers. In Codecov, attackers modified a widely used CI uploader script to send customers’ environment variables, often full of secrets, to their server for about two months. A customer caught it because the script’s checksum did not match.

Lessons: isolate build environments and protect signing keys; verify what you download with hashes, pinning, and signatures; and give CI short-lived, narrowly scoped credentials.

Bonus: AI assistants (2023 to 2025)

Researchers repeatedly showed prompt injection attacks against commercial AI assistants: data leaked through rendered Markdown images, workplace chat assistants exposing private content, persistent attacks through memory, and in 2025 a zero-click issue in an enterprise assistant (named EchoLeak by its discoverers) triggered by a crafted email. Each case combined private data, untrusted content, and a way to send data out. Vendors fixed each channel, but the vulnerability class remains, which is why AI features must be designed to contain a fooled model.

The pattern behind them all

Look back at the list. Unpatched software. Over-privileged roles. A missing authorization check. Reused passwords without MFA. Unverified scripts and build artifacts. None of these required exotic defenses. In every case, fundamentals applied consistently would have prevented the breach or sharply limited the damage.

Table of seven breaches with how attackers got in and what made each breach worse
Seven breaches, one pattern.

Key takeaways

  • Most breaches chain an initial weakness, missing internal barriers, and slow detection.
  • Patch management, least privilege, and monitoring that is itself monitored are essential.
  • APIs need authentication and object-level authorization, and every endpoint must be inventoried.
  • Client-side scripts, build pipelines, and AI features are all part of your attack surface.
  • Fundamentals, consistently applied, would have prevented or limited every one of these incidents.

Go deeper with the book

This article is adapted from Web Security in the Age of AI: Attacks, Defenses, Tools, and Bug Hunting for Modern Web Applications and LLM Systems by Rupak (see Chapter 26, “Lessons from Real-World Breaches”).

The book pairs every attack with its fix across 27 chapters, from core vulnerabilities and professional tools to bug bounty hunting, attacking and defending LLM applications, and lessons from real breaches. It includes hands-on labs, review questions, a full testing checklist, a security headers reference, and an LLM red teaming playbook.

Filed underAI Security
Tagged
Rupak Nepali
Written byRupak Nepali

Rupak Nepali is a web developer, manage Webocreation website and the author of six books:
Getting Started with OpenCart Module Development (Packt, 2013),
OpenCart Theme and Module Development (Packt, 2015),
OpenCart 4: Dev Guide for Themes & Extensions (2024),
OpenCart 4: User Manual (2025),
Cloudflare for the Enterprise Website (2026) and
The Technical Web Guide for Marketers (2026).
Rupak has built OpenCart stores and extensions since 2010, has published more than 600 tutorials on Webocreation, and shares free OpenCart extensions on GitHub.
Find Rupak on
GitHub | Amazon | LinkedIn | X | YouTube.

Leave a Reply

Your email address will not be published. Required fields are marked *