Magecart Card Skimming on WooCommerce and Shopify: How to Spot and Stop It

How Magecart-style card skimming attacks steal payment details from online shops, the warning signs, and how UK retailers can protect their checkout.

Yrzo AI28 November 2026 2 min read

What card skimming is

Card skimming — often called Magecart after the groups that made it famous — injects a small piece of JavaScript into an online shop's checkout. The script copies card numbers, expiry dates and CVVs as customers type, then quietly sends them to the attacker. The order still goes through, so neither the shop nor the customer notices until fraud reports arrive weeks later.

How the script gets in

  • A compromised plugin or theme on WooCommerce or another self-hosted platform.
  • A compromised third-party script — analytics, chat widgets or reviews loaded from someone else's server. This is a supply chain attack.
  • Stolen admin credentials, letting the attacker edit checkout templates directly.
  • Unprotected file uploads that allow a script to be planted on the server.

Hosted platforms like Shopify lock down the checkout itself, but apps and theme code on the storefront can still capture data on other pages. See Shopify app security risks.

Warning signs

  • customers report card fraud shortly after buying from you
  • unfamiliar domains in your browser's network tab on the checkout page
  • recently modified JavaScript files you did not change
  • new admin users or unexpected plugin updates

Is your site exposed to this?

Run a free, non-intrusive check of what attackers can see from outside. No account needed.

How to protect your checkout

  1. Use a hosted or iframe payment page where possible, so card data never touches your site's code.
  2. Set a strict [Content-Security-Policy](/blog/what-is-content-security-policy) that only allows scripts and connections to domains you trust.
  3. Use [Subresource Integrity](/blog/subresource-integrity-sri-explained) on third-party scripts so a tampered file is refused by the browser.
  4. Monitor script changes on payment pages. PCI DSS v4.0 requirements 6.4.3 and 11.6.1 now expect exactly this — see PCI DSS website security.
  5. Remove unused plugins and apps, and keep the rest updated.
  6. Protect admin accounts with two-factor authentication.

If you think you have been skimmed

Remove the malicious script, rotate all credentials, notify your payment provider, and consider your duty to report under UK GDPR breach rules. Then test the whole checkout flow — see e-commerce checkout security.

Check your shop today

Yrzo AI checks your checkout's headers, third-party scripts and exposure as part of every scan. Run a free scan or see the full report options.

Related reading: Magento Security Checklist for UK Online Retailers · Subresource Integrity (SRI) Explained: Protecting Third-Party Scripts · Shopify App Security Risks: What Store Owners Should Check

Magecart attackcard skimming WooCommercecheckout skimmer UKe-commerce payment page security
Share

Check your own website in 60 seconds

Free check, no account needed. Want the full picture? Full reports start at £149, with up to 110 checks with a 14-day money-back guarantee.

Keep reading