How British Airways Lost £20 Million to 22 Lines of Code
In 2018, attackers breached British Airways and modified their website. They injected a malicious script into the payment page — a classic XSS-based attack. For 15 days, every customer who entered their payment details on the British Airways website had those details silently sent to an attacker-controlled server.
500,000 customers had their names, billing addresses, email addresses, and full payment card details stolen — while the site looked completely normal.
Magecart — the group behind it
British Airways was one of dozens of victims of a group called Magecart. Their technique: find a way to inject JavaScript into checkout pages, then harvest payment data from every customer who visits. Other victims included Ticketmaster, Newegg, and hundreds of smaller e-commerce sites. The script was small — sometimes just 22 lines — but it ran silently inside a trusted domain.
The British Airways attack stole payment details even though the site used HTTPS. Why did HTTPS not prevent this?
What made the Magecart attack difficult for customers to detect?