Magento Zero Day Skimmer: A 7-Step Response

Magento Zero Day Skimmer: A 7-Step Response

A Magento zero day skimmer is two separate problems that share one name. The first is a flaw in the platform that attackers are using before a patch exists. The second is the card-stealing JavaScript they install once they are inside. Fixing the first does not remove the second. Merchants find this out the hard way: the store is patched by Tuesday lunchtime and still exfiltrating card numbers on Wednesday morning.

What follows is a seven-step sequence you can run on a live store the same day you hear about an exploited flaw, written for UK Magento and Adobe Commerce merchants, the developers who maintain them, and the ecommerce managers who own PCI compliance without writing code.

What a Magento zero day skimmer actually is

Three things get conflated in the reporting. A vulnerability disclosure is a flaw described, usually with a CVE number and a severity score. A zero day is a flaw being exploited in the wild before a fix is available, or before you have applied it. A skimmer is the payload: a few lines of JavaScript that read the card fields as they are typed and send a copy elsewhere.

The platform hole is only the door. The skimming crew wants persistence, and persistence in Magento rarely lives where a security advisory points. It lives in template files, layout XML, CMS blocks, the core_config_data table, admin-created content and sometimes a single modified.phtml. That is why patching alone never ends an incident.

The name Magecart came from crews scanning the open internet for the same unpatched Magento storefronts and hitting them with the same tooling. It describes a method rather than a single group. That matters operationally. If a researcher takes down one exfiltration domain, the hole in your store is still a hole, and a different crew running different infrastructure can find it within days.

The clearest example of the platform route at scale remains September 2020. Magento 1 had reached end of life on 30 June 2020, so there were no more official patches. Sansec reported that roughly 2,000 Magento 1 stores were skimmed over a single weekend that September, which it described at the time as the largest campaign it had recorded. Those merchants were not targeted individually. They were found by a scanner.

The routes in while you are waiting for a patch

Four, in rough order of how often they turn up in incident work.

  • Unpatched or end-of-life platform code. Including extensions nobody has maintained for three years, which are not covered by any Adobe bulletin at all.
  • Admin access. Reused passwords, a guessable admin path, an integration account created for a stock feed in 2019 and never revoked.
  • A compromised supplier. Script delivered from outside your estate, where your own code is clean and the file you load is not.
  • Injected first-party code. Once inside, the attacker puts the skimmer in your own templates, your layout XML or a database-stored content block, so it is served from your domain and inherits your trust.

Steps 1 to 3: confirm exposure before you change anything

Step 1: Establish your real version and patch level

Do not trust the admin dashboard on its own. Check the composer lock file and the deployed code, then compare against the current Adobe Commerce and Magento Open Source security bulletins. Security-only patches are published separately from full version upgrades, and a store can read as “2.4.x”while missing the isolated fix that matters. Note your composer version, your PHP version and every third-party module with its version. You will need that list twice before the day is out.

Step 2: Inventory what the checkout actually loads

Open the checkout in a browser with developer tools, go to the network tab, and filter to scripts. Write down every file and every domain. Then do the same on the payment step, which often loads more than the cart page does.

Compare that list against your last deployment. Anything present in the browser that is absent from your repository is the finding. Look especially for domains that imitate a familiar one: a CDN name with an extra hyphen, a Google-looking hostname that resolves somewhere unexpected, an analytics subdomain you never configured. To detect malicious JavaScript on an ecommerce site you usually need nothing more exotic than this, done carefully, by someone who knows what the page is supposed to contain.

Step 3: Read the suspect code, and take outside signals seriously

Open the script. Skimmers are usually obfuscated, so you are looking for long base64 or hex strings, arrays of encoded characters reassembled at runtime, atob calls, and event listeners attached to input fields by name or ID: cardnumber, cc-number, cvv, expiry. Then look for where it sends the result, often an image request or a fetch to a hostname that appears nowhere else in your code.

Search the database too, not just the filesystem. Grep the content blocks, CMS pages and configuration tables for <script, for eval(, and for any domain you listed in step 2 and could not account for.

If your acquirer calls, or an issuer sends a common point of purchase report, or a customer says their card was used fraudulently days after ordering from you, treat that as evidence and not as a coincidence. A working skimmer gives you no internal reason to look.

Steps 4 and 5: contain the skimmer and close the entry point

Step 4: Patch, and block at the edge until you can

Apply the vendor patch or the official mitigation as soon as it is available. Where no fix exists yet, put rules at the edge: a web application firewall rule matching the known exploit pattern, rate limiting on the affected endpoint, IP allowlisting on the admin path, and the admin interface behind a VPN if your hosting allows it. Edge rules are a tourniquet, not a repair.

Step 5: Rotate access, clean the injection, and date the compromise before you restore

Rotate the Magento admin passwords, the integration tokens, the API keys, the database credentials, the SSH keys and anything stored in a deployment pipeline. Then read the admin user list and look for accounts created recently, accounts with odd email domains, and scheduled tasks that nobody remembers adding.

Remove the injected code from files, from database content, and from every cache layer including Varnish, the CDN and any full-page cache in the application. Redeploy from your repository rather than editing the live filesystem.

Then the part that catches people. Backups are the quiet re-infection route. A merchant finds the skimmer, restores last week’s snapshot to be safe, and reinstalls the skimmer with their own hands. Work out the earliest evidence of intrusion first, from web server logs, admin login records and file modification times, and only then choose a restore point from before that date. Grep every candidate backup for the exact injected string before you trust it. If the string is in there, the backup is a copy of the compromise.

Steps 6 and 7: make the next zero day survivable

Step 6: Constrain what the payment page is allowed to run

Start with a Content Security Policy in report-only mode. A Content-Security-Policy-Report-Only header on checkout blocks nothing and breaks nothing; it simply reports every resource that would have been blocked. That makes it the one hardening step that is safe to begin during an active incident. Run it for a fortnight, read the reports, build the allowlist from what the checkout genuinely needs, and only then switch to the enforcing header. There is a working setup for a checkout-page policy if you want the directive-by-directive version.

Pin the third-party scripts you cannot control with Subresource Integrity, so the browser refuses a file whose hash has changed. The operating cost is real and vendors rarely mention it: when the supplier ships an update, the hash stops matching and their script is blocked. That is the control working as designed. It also means you need a written change notification agreement with that supplier, or your checkout breaks on their release schedule instead of yours.

The strongest fix is configuration rather than code. Hosted payment fields served from the payment provider put the card inputs in a frame your page cannot read, so an injected script on your domain has nothing to listen to. Be honest about the limits. Hosted fields do not protect billing addresses, order contents or account data, and they do nothing at all if the attacker replaces your entire payment step with a convincing fake form.

Step 7: Alert on change to the payment page the same day

Fetch the rendered checkout on a schedule, hash the script tags and the response headers, and store the result. When the hash changes, somebody gets an email. A cron job, a diff and an alert will do. Quarterly reviews are not detection; by then the campaign has finished.

How this response satisfies PCI DSS 4.0

Two requirements became mandatory on 31 March 2025, and the incident work above produces most of the evidence for both.

Requirement 6.4.3 asks for every script on the payment page to be inventoried, authorised and justified in writing, with assurance of its integrity. Your step 2 script list is that inventory. Requirement 11.6.1 asks for a mechanism that detects and alerts on unauthorised modification to the payment page’s HTTP headers and content, evaluated at least every seven days unless a targeted risk analysis justifies otherwise. Your step 7 diff job is that mechanism.

Neither needs a paid monitoring platform. A CSP report endpoint, a hash manifest in version control and a scheduled page diff cover the intent, and the text of both requirements is worth reading in full alongside the official standard from the PCI Security Standards Council. Build it once during the incident and you have standing evidence afterwards.

What the named incidents say about the next route in

Ticketmaster UK, 2018. The skimmer arrived in a chatbot script from a supplier, Inbenta, and not through any flaw in Ticketmaster’s own platform. The ICO fined Ticketmaster UK £1.25 million in November 2020. British Airways and Newegg, by contrast, were injected first-party code on the payment flow; the ICO fined British Airways £20 million in October 2020. VisionDirect, Macy’s, Claire’s and Warner Music Group ran very different stacks and were hit with recognisably similar tooling. The pattern across these incidents is consistent: four routes in, one method, many unconnected crews.

The lesson: patch the platform, then assume the next way in is a supplier’s script or your own admin login.

The short version

A magento zero day skimmer is an entry route plus a payload, and the payload outlives the patch. Confirm your real patch level, inventory what checkout loads, read the suspect code, patch and block at the edge, rotate every credential and clean the injection from files, database and cache, pick a restore point dated before the first sign of intrusion, then put CSP report-only, hosted payment fields and a daily page diff in place so the next one is found in hours rather than by your acquirer. The work doubles as PCI DSS 4.0 evidence. Do it once, properly.

Frequently Asked Questions

What is a Magento zero day skimmer?

It is card-stealing JavaScript installed on a Magento or Adobe Commerce store through a flaw that is being exploited before a patch is available or applied. The flaw is the entry route; the skimmer is the payload that reads card fields at checkout and sends a copy to an attacker-controlled domain. The two are separate problems and need separate fixes.

How do I know if my Magento checkout has skimming code injected?

Open the checkout in a browser with developer tools, list every script and domain it loads, and compare that list against your last deployment. Anything in the browser that is not in your repository is worth reading in full. Search both the filesystem and the database content blocks for obfuscated or base64-encoded strings and for listeners attached to card input fields.

Does patching Magento remove a skimmer that is already installed?

No. The patch closes the way in. The skimmer persists as first-party code in template files, layout XML, CMS blocks and database-stored content, none of which a platform update touches. A fully patched store can still be exfiltrating card numbers the next morning.

Can a Content Security Policy stop a skimmer injected into my own site?

Partly. A policy will not stop code served from your own domain if your own domain is allowed, but a tight allowlist blocks the exfiltration request to an unknown host, which breaks the theft at the last step. Report-only mode is safe to turn on during an incident because it blocks nothing and tells you what the page is loading.

Does responding to a Magento skimmer help with PCI DSS 4.0 compliance?

Yes, if you keep the artefacts. The script inventory you build satisfies the spirit of requirement 6.4.3, and a scheduled diff that alerts on changes to payment page content and headers addresses 11.6.1. Both have been mandatory since 31 March 2025, so the incident work becomes standing evidence rather than a one-off exercise.