Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Are Web Skimming and Magecart Attacks?

Web skimming injects malicious JavaScript into a checkout page to capture card details as they are typed, and Magecart is the collective name for the groups that industrialised it.

Illustration for the cybersecurity term Web Skimming and Magecart
Home / Blog / Cybersecurity Terms / What Are Web Skimming and Magecart Attacks?
17 November 2026

What Are Web Skimming and Magecart Attacks?

What Are Web Skimming and Magecart Attacks?

Web skimming is the digital equivalent of a card reader overlay on a cash machine. An attacker adds JavaScript to a payment page that reads the card number, expiry date, security code, and name as the customer types them, and sends a copy to a server under their control. The transaction completes normally, the customer receives their goods, and nothing appears wrong until the card is used fraudulently weeks later. Magecart is the umbrella name given to the many groups that have specialised in this since around 2015, named after the Magento e-commerce platform where the technique first appeared at scale.

The attack sidesteps every protection that operates after the data leaves the browser. Encryption in transit, tokenisation, and a payment provider’s security are all irrelevant when the theft happens at the keyboard.

How the Script Gets There

  1. Through a third-party script. The most consequential route. Checkout pages routinely load analytics, chat, tag management, personalisation, and advertising code, and compromising one supplier reaches every merchant using it.
  2. Through the platform. Unpatched e-commerce software, vulnerable plugins, and compromised extensions, which is how the earliest Magento campaigns operated.
  3. Through the administration interface, using stolen or weak credentials to inject code directly into a template or a tag manager.
  4. Through the cloud storage or delivery layer, such as a misconfigured bucket serving the merchant’s own JavaScript, modified in place.
  5. Through a supplier’s supplier, since third-party scripts frequently load fourth-party code that the merchant never evaluated.

Modern skimmers are evasive. They activate only on checkout pages, check for developer tools, avoid known research addresses, exfiltrate through image requests or WebSocket connections, and sometimes present a convincing fake payment form over a legitimate iframe so that the customer types into the attacker’s field rather than the provider’s.

The Two British Cases

British Airways, 2018. Between late August and early September, attackers modified a script on the airline’s website and mobile application, harvesting payment and personal details from several hundred thousand customers. The Information Commissioner’s Office issued a notice of intent proposing a penalty of £183 million and ultimately fined the airline £20 million in October 2020, reduced in light of remediation and the pandemic’s effect on the business. The findings described the absence of effective monitoring over changes to the site and insufficient restriction of access.

Ticketmaster UK, 2018. A chatbot supplied by a third party, Inbenta, was compromised and loaded on payment pages. The ICO fined Ticketmaster £1.25 million in November 2020, finding that the company had failed to assess the risks of the third-party script and had been slow to identify the breach despite reports of fraud from banks. The case is the clearest UK statement that a merchant is responsible for the code it loads, regardless of who wrote it.

Defences That Work

What PCI DSS Version 4 Changed

The standard now addresses this directly. Requirement 6.4.3 obliges merchants to manage the scripts loaded and executed on payment pages, with authorisation, integrity assurance, and an inventory with written justification for each. Requirement 11.6.1 requires a mechanism to detect and alert on unauthorised modification to the HTTP headers and content of payment pages. Both became mandatory on 31 March 2025, having previously been future-dated requirements.

This is a significant shift for merchants who had assumed that outsourcing payment processing removed their exposure. It does not. If your page serves the checkout, you are responsible for its integrity, and in the UK a successful skimming attack is also a personal data breach reportable to the Information Commissioner’s Office within 72 hours.

Our web application security services assess checkout integrity, third-party script exposure, and content security policy deployment against the way these attacks actually run.

FAQ – Frequently Asked Questions

Does Using a Payment Provider Protect Us from Skimming?

Only if the card fields are entered in an iframe served by the provider and your own page scripts cannot reach them. If the fields sit in your page, or your page loads scripts that can access them, a skimmer captures the data before the provider ever sees it. PCI DSS version 4 makes the merchant’s responsibility for payment page scripts explicit for exactly this reason.

Will a Content Security Policy Stop Magecart?

It blocks the most common exfiltration routes by restricting where the page may send data and which origins may execute scripts, which often defeats the attack even after a successful injection. It is not complete: policies that allow broad origins, or sites that permit inline scripts, leave gaps. Deploy it alongside script inventory, integrity checks, and external monitoring rather than on its own.

How Would We Know We Had Been Skimmed?

Usually through an acquirer’s common point of purchase report, which identifies your site as the shared link between many fraudulent cards. Earlier detection comes from monitoring the live checkout from outside your network for new scripts, changed file hashes, and unexpected outbound destinations. Server-side logs will show nothing, because the theft happens entirely in the customer’s browser.

Who Is Liable When a Third-Party Script Is Compromised?

The merchant, in the eyes of the UK regulator. The Ticketmaster penalty rested on the finding that the company had not adequately assessed the risk of a third-party chatbot loaded on payment pages and was slow to detect the breach. Contractual recourse against the supplier may exist, but the data protection and card scheme obligations stay with whoever serves the page.

Related Terms

You May Be Interested In These

What Is a Botnet?

Cybersecurity Terms

17 November 2026

What Is a Botnet?

Read More
What Is XXE Injection?

Cybersecurity Terms

17 November 2026

What Is XXE Injection?

Read More