Back to the archive

The encyclopedia · Software & IT · Technical decision · 2018–2020

British Airways was fined £20M after 22 lines of code stole 400,000 customers' details

Hackers injected a skimming script into BA's website and harvested card data for two months — the ICO called it preventable.

British Airways · 2018-09-06

What happened

On 6 September 2018 British Airways disclosed that its website and mobile app had been compromised. Attackers had injected 22 lines of JavaScript — a technique attributed to the Magecart group — that diverted customers' payment card details, names, addresses and CVV codes to an attacker-controlled server while bookings appeared to proceed normally. The script was active from 21 August to 5 September; by the time BA removed it, the personal data of approximately 429,612 people had been exposed.

The ICO's investigation found the breach was entirely preventable. BA had failed to enable multi-factor authentication on a privileged administrator account, had left a testing feature running that logged payment card details in plaintext, and had done insufficient security testing on its own website. Attackers entered through compromised credentials for a third-party cargo handler's account, escalated privileges by finding a plaintext password file, and then modified the payment page code.

The ICO initially intended to fine BA £183.39 million — 1.5% of the airline's 2017 turnover, and the largest proposed GDPR penalty at the time. In October 2020 the final fine was reduced to £20 million, with the regulator citing the economic impact of Covid-19 and BA's mitigating steps. Even reduced, it was the largest ICO penalty ever issued.

Why it happened

  • Multi-factor authentication was available but not enabled on privileged accounts, letting attackers escalate from a compromised third-party login to administrator access.
  • A testing feature left running in production logged full payment card details — including CVV codes — in plaintext, violating PCI DSS rules.
  • BA did not detect the injected script for over two weeks; a third-party security researcher, not BA's own monitoring, first spotted the compromise.
  • Insufficient security testing of the website meant the 22-line JavaScript injection went unnoticed during the entire attack window.
What it cost£20M ICO fine; 429,612 customers exposedcostly

The lesson

The worst breaches exploit ordinary gaps — an unpatched setting, a leftover test feature. Put multi-factor authentication on every privileged account.

Sources

spotted an error? The club wants to know.

Comments · 0

    Sign in to join the comments.

    More like this

    Somewhere, someone solved the problem this company failed at. 2nd Opinion →