By Hridoy Ahmed | Last updated: November 2026 | 12 min read
Short answer: Checkout malware, often called a card skimmer, is script code that copies payment details while customers type them. You detect it by listing every script that loads on your checkout, checking files, database entries, API keys and webhooks, and listening to fraud reports from customers and your payment provider. If you find it, take card payments offline, contact your payment provider, remove the code and its entry point, rotate every credential and re-test before you reopen.
In this guide
- What checkout malware is
- Warning signs
- How to detect it safely
- If you find it: the first hour
- How to clean it
- How to prevent it
- What PCI DSS says about payment page scripts
- FAQ
What checkout malware is
When a customer types a card number into your checkout page, a normal script does nothing with it except pass it to your payment provider. A skimmer is a malicious script on that page. It reads what the customer types and sends it to an attacker. It is also called e-skimming or digital skimming, and the attack family is often named Magecart.
Skimmers are hard to see for three reasons:
- They run in the customer’s browser, so your server may look normal.
- They often load from another domain, so no file on your site looks wrong.
- They may appear only on the checkout page, or hide from logged-in administrators.
This guide covers detection, response and prevention only.
Warning signs
- Fraud reports. Customers report fraud on cards they used only at your store.
- A notice from your payment provider or bank that your store looks like a common point of purchase for stolen cards.
- Unfamiliar scripts on the checkout page.
- Odd checkout behavior, such as slower loading, fields that flash or extra fields.
- A security scan alert about injected code.
- Other signs of compromise: unknown admin users, changed files, or changed payment settings. See signs that your WordPress site is hacked.
How to detect it safely
- Test in a clean browser. Open a private window, do not log in, add a product and go to checkout. Use your browser’s developer tools, open the Network tab, reload and filter by JavaScript. Write down every domain that loads a script. Compare the list with what you expect: your own domain, your payment provider and tools you installed. Investigate any domain you cannot explain. Remember that malware may not show every time.
- Read the page source. Look for inline scripts you did not add. Compare with a staging copy or a backup from before the problem.
- Check files. Compare WordPress core and plugin files with official copies.
wp core verify-checksumsandwp plugin verify-checksums --allhelp. Check theme files, the mu-plugins folder and the uploads folder for PHP files. See WordPress backdoors. - Check places where scripts can hide in the database and settings. Look at header and footer script plugins, custom code fields, widgets, theme options and the Customizer’s additional code. See malware in the WordPress database.
- Review WooCommerce access points. In WooCommerce settings under Advanced, review REST API keys and webhooks. Remove keys and webhooks you do not recognize. A webhook can send order data to an outside address.
- Check users. Look for unknown administrators and shop managers. See unknown admin users.
- Check your payment gateway dashboard. Review API keys, payout settings, allowed domains and recent activity for changes you did not make.
- Check logs. Look at your hosting and security plugin logs for logins and file changes around the first fraud report.
A scan can help but does not prove your checkout is clean. Compare tools in my guide to Wordfence and Sucuri.
If you find it: the first hour
| Do | Why |
|---|---|
| Stop taking card payments on the affected checkout, or switch to a hosted payment page that sends customers to your provider’s own page | This stops new card data from going to the attacker |
| Make a full copy of the files, database and logs before you clean | You need evidence and a way to find the entry point |
| Contact your payment provider or acquiring bank | They may have specific rules and support for incidents, and they may already know |
| Note the date range of the exposure as best you can | It decides who may be affected |
| Ask a legal professional about notification duties | Rules on breach notification differ by country and by the data involved |
| Do not just delete the script and reopen | The entry point stays open and the script returns |
How to clean it
- Remove the injected code from files, the database and plugin settings.
- Replace WordPress core and all plugins with fresh copies from official sources. Delete unused and pirated plugins. See nulled plugins and themes.
- Find and close the entry point. The cause is often an outdated plugin, a stolen password or a backdoor. See what to do when a plugin has a flaw.
- Rotate every credential: WordPress admin passwords, hosting, FTP, SSH, database password and security keys, payment gateway API keys, WooCommerce REST keys and any third-party tokens.
- Remove rogue users, keys and webhooks.
- Re-scan and re-test the checkout with the same Network tab method. Compare the new script list with your approved list.
- Reopen carefully, after your provider agrees if they were involved.
- Monitor for at least a month. See the reinfection checklist.
Checkout incidents carry money and legal consequences, so get help early. My WordPress malware removal service covers file and database cleanup and entry point checks.
How to prevent it
- Use hosted payment fields or a redirect from a reputable provider, so card numbers do not touch your own page code. This lowers risk, but it does not remove your duty to protect the page that loads the payment form.
- Keep scripts on the checkout page to a minimum. Remove chat widgets, heatmaps and extra trackers from the checkout if you do not truly need them. Every script is a possible entry point.
- Keep an approved script list for the checkout: what each script does, who owns it and why it is there. Review it every month.
- Use a Content Security Policy. Start in report-only mode to see what loads, then tighten it. It can block scripts from unexpected domains.
- Use Subresource Integrity for third-party scripts that do not change, where the vendor supports it. It does not fit scripts that change often.
- Monitor file and page changes with a file integrity tool or a page change detection service.
- Update everything quickly, test updates on staging and delete unused plugins.
- Protect admin accounts with strong passwords and two-factor authentication. See WordPress 2FA and brute force defense.
- Review REST keys, webhooks and users every quarter.
- Use a firewall. See the WordPress firewall guide.
- Harden the site. See WordPress hardening.
What PCI DSS says about payment page scripts
Version 4.0.1 of the PCI DSS standard contains two requirements aimed at skimming. Requirement 6.4.3 asks you to manage the scripts on payment pages: keep an inventory, authorize each script, justify it and check its integrity. Requirement 11.6.1 asks you to detect and alert on unauthorized changes to payment page scripts and security headers. Both became mandatory on 31 March 2025.
How they apply to you depends on how you take payments and on what your payment provider or bank requires. Merchants who use an embedded payment form may still have duties for the page that loads it. Ask your provider, and do not assume that a hosted form frees you from these controls.
FAQ
Can a security plugin find checkout skimmers?
Sometimes it can, but not always. Skimmers can load from external domains and hide from scans. Check the live checkout page too.
Does a hosted payment page make me safe?
It lowers your exposure, but attackers can still target the pages and scripts around it. Keep scripts minimal and monitored.
How long can a skimmer run before anyone notices?
It can run for weeks or longer. Many store owners learn about it from customers or their payment provider.
Should I tell my customers?
You may have legal duties. Ask a legal professional and your payment provider before you decide what to say, and be honest and clear when you do.
Will cleaning the site be enough?
Only if you also close the entry point and rotate all credentials. Otherwise the code usually returns.
Suspect a skimmer on your checkout? I check scripts, files, keys and webhooks and close the entry point. See my WordPress security and malware removal service.
About the author: Hridoy Ahmed is an SEO specialist and WordPress security expert based in Dhaka, Bangladesh. He has 8+ years of experience and works with clients worldwide.
