Attacks

HexMage: the card skimmer dressed up as Google Tag Manager

It looks like a tag most stores already run. Its server address lives on a blockchain, so blocking it does not last.

TL;DRThe fake Google Tag Manager skimmer

What it is

A card skimmer whose loader is written to look like a Google Tag Manager snippet, found on more than 40 online stores.

Why it slips through

It looks like a tag most stores already run, and it reads its delivery server from a blockchain, so blocking that server does not stop it.

What catches it

New code on checkout, a crypto library on a store that takes no crypto, and card data going to a host that has never appeared before.

What is the HexMage skimmer?

HexMage is a card-skimming campaign that hides its loader in a fake Google Tag Manager block on the store's own pages. The loader looks up the address of its skimmer in a smart contract on an Ethereum test network, downloads it, and shows shoppers a fake card form at checkout. The ad security firm Confiant named and published the campaign on 28 August 2026. It counted more than 40 affected stores in at least 15 countries since about April 2026. Most run WooCommerce; a few run PrestaShop, Magento or plain WordPress.

How the attack works, step by step

  • The loader goes into the store's own page code. It is wrapped in the usual Google Tag Manager comments and starts like a real snippet, with an ID in the GTM- format. Everything else is base64-encoded.
  • It never loads Google Tag Manager. The ID is not a container. It points to the attacker's contract, and no request to Google's tag manager is ever made.
  • It loads a crypto library from a public CDN. The loader pulls ethers.js, a legitimate open source library, from a public JavaScript CDN.
  • It asks the blockchain where to go. Through a public node on Sepolia, an Ethereum test network, it reads one text value from a contract. The value is the hostname that serves the skimmer. Since May 2026 that value is encrypted, so reading the contract alone no longer reveals it.
  • It downloads the skimmer from that host. The file name looks like an ordinary minified script.
  • It waits for the card option. When the shopper chooses to pay by card, the skimmer shows its own card form in place of the real one, with the usual card-brand icons so it looks right.
  • It takes the details and steps aside. Card number, expiry, CVV, name and email are base64-encoded and sent to the attacker. The real form comes back and the order goes through, so the shopper has no reason to suspect anything.

The skimmer also checks whether a logged-in WordPress admin is viewing the page, and if so does nothing. A store owner who tests their own checkout while logged in sees a clean page.

Why the blockchain makes blocking harder

A typical skimmer has its server address written into its code. Once someone finds it, the domain is blocked or taken down and the skimmer goes quiet. Here the address lives in the contract. When a host is blocked, the attacker writes a new value to the contract or points to another contract, and every infected store picks up the new host on the next page load, without the attacker touching the stores again.

Confiant traced the contracts it saw to a single wallet, which deployed 144 contracts between 28 March and 21 July 2026. It also found a simpler version on two stores that skips the blockchain and carries the skimmer's address in the encoded block itself. Detection that looks only for the blockchain lookup misses that version.

Why the usual controls miss it

Each control below either trusts what the loader pretends to be, or blocks something the attacker can replace.

ControlWhat it checksWhy HexMage gets past it
Blocking the skimmer's domainOne known bad hostThe attacker rewrites the contract and the stores move to a new host
Google Tag Manager container allowlistWhich GTM containers may loadThe fake block never loads a container, so there is nothing to allow or block
CSP script-srcWhich sources scripts may come fromPasses if the policy allows inline script and the public CDN, which tag manager setups often need
Manual checkout testWhat the page shows the testerThe skimmer stays quiet for a logged-in admin, and only appears after the card option is chosen
Reviewing the page sourceWhat the code looks likeIt looks like a GTM snippet, and the rest is base64

See tag manager security for the risks of real tag manager containers, and skimmers in your own JavaScript for skimmers that hide in a site's own files.

What gives it away

The disguise is good, but what the code does on checkout is unusual. Four signals stand out:

  • A GTM snippet with no GTM request. Real Google Tag Manager always fetches its container script, gtm.js, from Google or from your own tagging server. A block that sets up GTM and never fetches gtm.js is not GTM.
  • A crypto library on checkout. ethers.js on a shop that does not take crypto has no business being there.
  • Calls to a blockchain node from the browser. JSON-RPC requests from a checkout page to a public Ethereum node are rare on an ordinary store.
  • Card data going somewhere new. Checkout pages send data to a small, stable set of places: your payment provider, your own servers and a few known services. A new host receiving form data is the clearest signal of all.

What PCI DSS 6.4.3 & 11.6.1 say about it

6.4.3 asks for an inventory of every script on the payment page with a business justification, and a way to confirm each one is authorised and has not been tampered with. The fake GTM block, ethers.js and the downloaded skimmer are all scripts executing in the shopper's browser, so none of them could be justified. 11.6.1 asks for a mechanism that alerts on unauthorised changes to the payment page's script contents and security-impacting HTTP headers as the browser receives them, at least weekly. A loader added to the page is exactly that kind of change.

See every script on your checkout as real shoppers receive it, and get alerted when new code appears. Free on 1,000 page views a month.

What to do this week

  • Search your page templates and theme files for Google Tag Manager blocks, and check each container ID against the containers you actually use
  • Flag any GTM snippet that never fetches gtm.js, and any ethers.js or Web3 library on a store that does not take crypto
  • Test checkout logged out, in a private window, and choose each payment option, card included
  • Watch where your checkout sends data, and alert on new destinations
  • Restrict connect-src and form-action in your CSP to the destinations you expect, and remove 'unsafe-inline' where you can
  • Patch WordPress, WooCommerce and plugins, and rotate admin passwords: someone had write access to add the loader to your page code

How Script Monitoring catches it

Script Monitoring records every script that runs on your payment pages in real customer sessions, so the skimmer cannot hide behind the admin check: real shoppers are not logged in. The ethers.js library shows up as a new script on checkout, and every host the page talks to, including the blockchain node, the skimmer's server and the attacker's collector, appears as a new network destination. You can block a script at runtime by URL, host, domain or vendor on every plan. On Pro, AI script analysis reads new code on the page and is built to flag card-stealing code as a payment skimmer, and guardrails can stop your own inline code from reading card fields. The same record is your evidence for PCI DSS 6.4.3 & 11.6.1. Read more on Magecart protection and AI script analysis.

Where it does not help. Our GTM containers allowlist would not fire here, because no real container loads. We see what the loader does in the browser, not how it got into your site: finding and closing that hole is work on your server. And blocking the current delivery host only lasts until the attacker rewrites the contract, which is why watching for new code and new destinations matters more than any single block.

Sources and methodology

The technical details, dates and counts are from Confiant's report "Skimming on the Blockchain: A Magecart Campaign That Uses EtherHiding, Found by Malvertising Scanning" (28 August 2026), with counts as of 25 August 2026. Later reports of a higher number of affected stores could not be confirmed independently, so this post uses Confiant's figure. No affected store is named. Requirement descriptions are paraphrased from PCI DSS v4.0.1, published by the PCI Security Standards Council. Written on 13 November 2026 and will be updated if new research is published.

Ask an AI

Don’t just take our word for it

How does the HexMage skimmer hide in a fake Google Tag Manager block, and how do you detect a skimmer whose server address is stored on a blockchain?

Frequently asked questions

Is Google Tag Manager itself compromised?

No. HexMage only imitates the look of a GTM snippet. It never loads Google Tag Manager, and no real container is involved.

Is ethers.js malicious?

No. It is a widely used, legitimate library for talking to Ethereum. The warning sign is finding it on a checkout page that has no reason to use a blockchain.

Does this only affect WooCommerce?

Most of the stores Confiant found run WooCommerce, but it also found PrestaShop, Magento and plain WordPress sites. The loader is ordinary JavaScript, so any platform whose page code can be changed is exposed.

Would blocking the skimmer's domain stop it?

Only until the attacker writes a new host to the contract. Removing the loader from your page code is what stops it, and watching for new code and new destinations is what tells you it has come back.

Would a Content Security Policy stop it?

A strict one helps. A policy without 'unsafe-inline' blocks the injected block unless it carries a valid nonce, and a tight connect-src makes it harder to send card data out. Many tag manager setups allow inline script, though, and then the loader runs.

Does PCI DSS 6.4.3 cover inline scripts?

Yes. It covers every script loaded and executed in the customer's browser on a payment page, whether it comes from a file or sits inline in the page.

See every script on your own checkout.

Install the tag, mark your payment pages, and watch the inventory fill in. Free forever on 1,000 page views a month, no credit card.

Free forever plan. No credit card.