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
How to protect your checkout
- Use a hosted or iframe payment page where possible, so card data never touches your site's code.
- Set a strict [Content-Security-Policy](/blog/what-is-content-security-policy) that only allows scripts and connections to domains you trust.
- Use [Subresource Integrity](/blog/subresource-integrity-sri-explained) on third-party scripts so a tampered file is refused by the browser.
- 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.
- Remove unused plugins and apps, and keep the rest updated.
- 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