A Magecart attack is code planted on a website that copies card details as shoppers type them at checkout and sends them to criminals. The payment still goes through, so neither the shopper nor the store sees anything wrong.
The skimmers that made the news this autumn arrived inside scripts the stores had chosen to load: an A/B testing tool, an ad pixel, a cookie banner, an analytics server and a payment widget. None of them needed a hole in the store’s own code, and patching the store’s platform made no difference to them.
Most checkouts load many scripts like these, added over the years by marketing teams, agencies and apps. Each of them can read the checkout page, and few stores could say today which one would carry the next skimmer or what would stop it.
What is a Magecart attack?
A Magecart attack is the theft of payment card details from an online checkout by code that criminals plant on the site or in a script the site loads. Sansec’s guide to Magecart lists its other names: web skimming, digital skimming and formjacking. The code copies what shoppers type and sends it to the attacker while the order completes as normal.
The name joins “Magento” and “shopping cart.” Sansec reported the first mass attack in 2015, when it found more than 3,000 compromised Magento stores in December of that year. The name stayed as the method spread, and today it covers card skimming on any platform.
The skimming code runs in one of two places. Most of it runs in the shopper’s browser as JavaScript, the same way as the small programs, or scripts, that a page loads to show a banner, count visits or run the checkout form. The rest runs on the store’s server, usually as PHP code. A browser skimmer reads the card number, expiry date and CVV as they are typed, and often the name, address, phone number and email too.
How a skimmer gets onto a checkout
A skimmer reaches a checkout page by one of three routes:
- A flaw in the store’s platform or in an extension, such as PolyShell on Magento
- A change to the store’s own files, such as its copy of a JavaScript library
- A change to a third-party script the page loads from a vendor, which Sansec calls a supply chain attack
Patches and extension updates close the first route, and our Magento 2 security guide covers how. The largest cases this autumn used the third.

Magecart attacks in 2026: what happened this autumn
The largest Magecart cases of autumn 2026 came in through vendors’ scripts. Between September and late November, researchers reported altered files from an A/B testing tool, a payment widget, an analytics server, an ad pixel and a cookie banner. Two more kits were found in shops’ own pages. In the vendor cases, the stores’ own code and patch level played no part.
| Date | Where the skimmer came in | What it took | Reported by |
|---|---|---|---|
| Sep 14 | Brevo tracker and chat widget scripts on 100,000+ sites | No cards: a WordPress backdoor and a ClickFix overlay, by the same route | Sansec |
| Oct 24 | Convertr’s self-hosted Plausible analytics script | Card details and CPF numbers in Brazil | Sansec |
| Reported Nov 5 | SuperPixel, added to the shop’s own copy of jQuery on 100+ shops | Card details, through fake payment forms | Report URI |
| Reported Nov 13 | A fake card form on tens of shops whose checkout never asks for a card | Card details | Report URI |
| Nov 13 to 22 | A shared Naviga payment widget on about 80 US news sites | Payment form data, sent over WebRTC | Guardio |
| Nov 16 | Optimizely’s Project JavaScript field: 178 organizations, 188 snippets | Cards, cookies, screenshots and crypto wallet swaps | Report URI |
| Week before Black Friday | An ad pixel, a cookie-banner setting and a retailer’s CDN file on five retail checkouts | Card and contact details, sent over WebRTC | InfoHawk |
Optimizely: one testing tool, 178 organizations
On November 16, 2026, Report URI reported that malicious JavaScript had reached visitors of 178 organizations through Optimizely Web, an A/B testing tool. Its researchers checked 1,611 Optimizely snippets and found the code in 188, and they say the real number is likely higher.
Each Optimizely customer loads a snippet, a JavaScript file, from Optimizely’s CDN, and the snippet runs a field of custom code called Project JavaScript on every page. The attacker wrote a loader into that field and left the rest of the snippet alone, so the file still came from Optimizely’s CDN with Optimizely’s certificate. One version of the loader hid the attacker’s address in base64, so a text search for the domain found nothing.
The payload swapped crypto wallet addresses, stole cookies and screenshots, and tried to load exploit kits on iPhones and iPads. The card skimmer was added at 13:43 UTC, and most snippets were clean again by the evening.
Optimizely told customers, as reported by CMSWire, that an unauthorized third party used a flaw in the Web Experimentation account signup flow to impersonate users on targeted accounts and insert JavaScript. “This was not a credentials breach,” the company said. It put the affected share below 5% of its customers.
The skimmer read the card number, expiry date and CVV from a site’s own form fields. It could not read cards typed into a cross-origin payment iframe, such as Stripe’s hosted fields or Adyen’s. An iframe is a frame inside your page that loads from another company’s domain, and cross-origin means scripts on your page cannot read what is inside it.
Nobody can say how many cards were taken. Report URI traced about $7,000 in stolen crypto, but it cannot see how many cards were skimmed.
WebRTC skimmers: card data with no request to find
WebRTC is the browser technology behind video calls, and it opens a direct data connection without ordinary web requests. In March 2026, Sansec reported the first skimmer it had seen that used WebRTC to send card data out.
This channel gets past two common defenses. A Content Security Policy (CSP), the rules a site gives the browser about where a page may send data, controls fetch, XHR and WebSocket connections through its connect-src rule, and that rule has no effect on WebRTC. The data also travels over encrypted UDP, so tools that inspect HTTP traffic never see it leave.
The method came back twice in November. According to Risky Bulletin, Guardio found a Magecart script in a shared Naviga payment widget on the subscription pages of about 80 major US newspapers. It was live from November 13 to 22, loaded about 15,000 times a day, and sent the form data when the reader hovered over the payment button, before any click.
In the week before Black Friday, InfoHawk reported a card-skimming script on the online stores of five retail brands. It arrived through an altered ad pixel, an edited cookie-consent banner setting and an altered file on a retailer’s own CDN. It ran only on small or touch screens, and on one site only on the checkout page, so a desktop check or a homepage scan would likely have missed it. Its traffic appeared to run through Cloudflare’s relay, and every copy was removed on November 24 or 25.

Analytics, widgets and your own files
In October, Sansec reported that a Brazilian Magecart group planted a skimmer in the analytics script of Convertr, an eCommerce platform that runs the stores and checkout of dozens of Brazilian fashion brands. Convertr served that script from its own Plausible analytics server, so one altered file reached every merchant checkout. From October 24, those checkouts sent card details and CPF numbers, Brazil’s taxpayer IDs, to the attacker, until Convertr removed the skimmer on October 27. Sansec suspects an unpatched Plausible flaw, CVE-2026-8467, fixed in May 2026, but has not seen the server logs.
The same route can carry other payloads. On September 14, Brevo’s tracker and chat widget served a WordPress backdoor and a fake “verify you are human” prompt to visitors of more than 100,000 customer sites for about four hours.
Two November kits needed no vendor at all. SuperPixel, found on more than 100 shops running WordPress, PrestaShop or OpenCart, was appended to the shop’s own copy of jQuery and replaced payment forms with fakes. A second kit, found on tens of shops whose checkout sends shoppers to a payment gateway or takes cash on delivery, added a fake card form styled to the payment brand, then put the real checkout back so the order went through. It did not show the form to logged-in admins.
๐ Quick takeaway
The infected Optimizely snippet came from Optimizely’s own CDN with Optimizely’s certificate. If your only script protection is a list of allowed vendor domains, that list would have let this file through.
Why trusted scripts are the easiest way in
A trusted script is the easiest way in because one altered vendor file runs on every site that loads it, with the same access to the page as the store’s own code. The store’s files and patches stay untouched, so the usual checks find nothing. Security teams call this area client-side security: control of the code that runs in the shopper’s browser.
Most of these scripts are added by marketing teams, agencies and apps, and often no single person owns the list. They also change without a release on your side. Optimizely’s snippet, according to the vendor’s documentation, updates itself whenever a customer changes a setting. A Black Friday code freeze stops changes to your own code, and vendor scripts keep changing through it.
The kits are built to stay out of sight of the people who would look for them. This autumn’s examples skipped logged-in admins, ran only on phones or ran only on the checkout page.
Late detection is normal. We reviewed 84 skimming breach notices filed in Washington State between 2015 and November 2026, and the skimmers ran for a median of 177.5 days before the store became aware of them. In 24 of the 29 notices that say how the store found out, someone outside the store raised the alarm, such as a card processor, a bank or a customer.
A class action filed on November 24, 2026 in federal court in New York names the owner of one affected website as a defendant alongside Optimizely, saying the owner was responsible for vetting, monitoring and controlling the third-party code on its pages. These are allegations, and nothing has been proven.
Does a hosted payment page protect you from Magecart?
A hosted payment page or hosted card fields lower your Magecart risk without removing it. A skimmer on your page cannot read card details typed inside the payment provider’s own frame. It can still change the page around that frame, for example by showing shoppers a fake card form before they reach the real one.
Both effects showed up this autumn. Optimizely’s skimmer could not read cards typed into cross-origin iframes, and on the news sites with the Naviga widget, readers who paid with Apple Pay, Google Pay or PayPal were not affected.
The fake forms worked anyway. The kit Report URI described on November 13 added a card form to checkouts that never ask for a card, and SuperPixel replaced real payment forms with copies. In both cases, shoppers typed their card details into a form the attacker controlled. That is why PCI DSS asks even merchants who outsource their payment page to confirm that scripts cannot be used to attack their site, as the PCI section below explains.
๐ Quick takeaway
Ask your developer whether the card fields on your checkout load in a cross-origin iframe from your payment provider. If they are part of your own page, every script on that page can read what shoppers type into them.
Content security policy against Magecart: what it blocks and what it misses
A strict Content Security Policy stops most of what this autumn’s Magecart kits needed, and a loose one stops nothing. A CSP is a list your site sends with each page that tells the browser where scripts may load from and where the page may send data. The browser blocks whatever is not on the list.
After the Optimizely incident, Report URI checked the policies on the affected organizations’ own sites and published results for 159 of them:
- 68 had no CSP at all
- 50 had a CSP that allowed both the payload and the data theft
- 17 ran the payload, but
connect-srcblocked the data theft (crypto address swapping still worked) - 24, or 15%, blocked the payload

Allowing Optimizely’s CDN host in the policy never helped, because the malicious code came from that host. What protected the 24 was a restrictive script-src, the rule that controls which scripts may run. Two common settings let the payload through, according to Report URI. 'strict-dynamic' trusts any script that an already trusted script inserts. 'unsafe-eval' allows code built from text, and Optimizely’s documentation tells customers to allow it, so the inline copy of the payload ran even where the external file was blocked.
CSP does not cover WebRTC. Report URI’s notes on WebRTC skimmers say connect-src blocks the web requests a skimmer makes to fetch its code or set up its channel, and does not block the WebRTC channel itself. InfoHawk’s advice after the Black Friday cases was a connect-src rule on every payment page that lists only the hosts you use, which blocks the two web requests that kit needed before WebRTC opened.
| Control | What it stops | What it misses |
|---|---|---|
CSP script-src | Scripts from sources you have not allowed | Code added to a file you allow, and payloads let through by 'strict-dynamic' or 'unsafe-eval' |
CSP connect-src | Web requests that send data to hosts you have not listed | WebRTC channels, and changes made on the page itself |
| Subresource Integrity | A pinned file that has changed since you approved it | Scripts built to change, such as a testing snippet |
| Chrome’s Connection Allowlist | WebRTC connections, blocked by default | Shoppers on other browsers |
| Hosted payment fields in a cross-origin iframe | Scripts on your page reading the card fields | A fake card form added to your page |
| Script monitoring with alerts | A changed script going unnoticed for months | Kits that run only on phones or only at checkout, if the monitor checks neither |
PCI DSS 6.4.3 and 11.6.1: what card rules ask of your checkout scripts
PCI DSS, the card industry’s security standard, has two requirements for the scripts on payment pages. Requirement 6.4.3 says every script must be authorized, have its integrity assured and be listed in an inventory with a written reason. Requirement 11.6.1 says you need a way to detect unauthorized changes to those scripts and to the page’s security headers, with alerts. Both took effect on March 31, 2025.
Merchants who outsource their payment page often validate with SAQ A, the shortest PCI self-assessment questionnaire. In January 2025, the PCI Security Standards Council removed both requirements from SAQ A and added an eligibility condition in their place: merchants must “confirm their site is not susceptible to attacks from scripts” that could affect their eCommerce systems. The Council said the change does not remove or reduce the underlying requirements.
PCI’s FAQ 1588 gives SAQ A merchants two ways to meet that condition: use techniques such as those in 6.4.3 and 11.6.1, or get confirmation from a PCI DSS compliant service provider or payment processor. According to Report URI’s plain-English FAQ, a CSP in report-only mode can cover the authorization part of 6.4.3 and feed the change detection in 11.6.1. Enforcing it is stronger, and PCI does not require it. Merchants on SAQ A-EP have both requirements in full, and our PCI DSS SAQ guide explains which questionnaire fits which checkout.
The work is split across teams. Marketing owns most of the tags, your developer or agency owns the CSP, and the payment provider owns its iframe, so the script inventory needs one named owner across all of them.
๐ Quick takeaway
If you validate with SAQ A, write down which of the two FAQ 1588 options you rely on to show your site is safe from script attacks, and who gave you that confirmation.
How to check your checkout for Magecart this week
You can check your checkout this week by listing every script on your checkout and payment pages, removing the ones the checkout does not need and reading the custom code in your vendor accounts. Then test the payment step on a phone, put a Content Security Policy on the payment pages and set alerts for script changes.
- List every script that runs on your checkout and payment pages, including tag manager containers, consent-banner settings, A/B testing custom code and pixels.
- Remove every script the checkout does not need. After the Optimizely case, StepSecurity’s advice was to keep third-party tags off checkout pages.
- Open the custom-code fields and settings in each vendor account and look for scripts you did not write, including encoded text such as
atob(. - Test the payment step on a phone, because the Black Friday kit ran only on small or touch screens.
- Turn on a CSP in report-only mode, then enforce it on payment pages with a restrictive
script-srcandconnect-src, avoiding'unsafe-eval'and'strict-dynamic'where you can. - Review which users, API tokens and integrations can write to each vendor account, and rotate the credentials.
- Set alerts for changes to scripts and security headers on payment pages, and name the person who receives them.
- Take card details in your payment provider’s own fields, in a cross-origin iframe.
On Magento (Adobe Commerce), our Magento security checklist lists the platform checks to run alongside these, including CMS blocks and the HTML head settings where skimmers are often added.
What to do if you find a skimmer
If you find a skimmer, save a copy of the code and note the times before you remove anything. Then find out how it got in, close that route and work out how long it ran. Tell your payment processor, and treat every card entered during that period as potentially exposed.
How you close the route depends on where the code came from. A skimmer in a vendor account means reviewing who and what can write to that account and rotating the credentials. A skimmer in your own files or on your server means someone has access to your systems. Removing the script alone invites a repeat: one Optimizely customer’s snippet was cleaned and then infected again.
Allow for browser caching when you set the exposure period. In the Convertr case, browsers kept the infected script for up to 24 hours after the cleanup. Card numbers taken by a skimmer are often tested on other stores’ checkouts, which is the fraud our guide to stopping a carding attack covers.
Magecart FAQ
Is Magecart still active in 2026?
Yes. In autumn 2026, researchers reported card skimmers delivered through an A/B testing tool to visitors of 178 organizations, through a payment widget on about 80 US news sites, and through marketing scripts on five retail checkouts in the week before Black Friday. In March 2026, Sansec also reported the first skimmer it had seen that sends card data over WebRTC.
Why is it called Magecart?
The name combines “Magento” and “shopping cart.” Sansec reported the first mass attack of this kind in 2015, when it found more than 3,000 compromised Magento stores. The name stayed as the method spread to other platforms, and it now means card skimming on any website that takes payments. The same attack is also called web skimming or formjacking.
Does Magecart only affect Magento stores?
No. The 2026 cases reached shops on WordPress, PrestaShop and OpenCart, the subscription pages of news sites, a Brazilian commerce platform and any website that loaded an altered vendor script. A skimmer needs a page where people type card details and a way to run a script on it, on any platform.
Can a Content Security Policy stop Magecart?
A strict one stops a lot, and a loose one stops nothing. When Report URI checked 159 organizations hit through Optimizely, 24 had a policy that blocked the payload, 68 had no policy and 50 had one that allowed everything the attacker needed. CSP also has a gap: its connect-src rule does not cover WebRTC connections.
Am I safe if I use Stripe or another hosted payment form?
You are safer, with one condition. A skimmer on your page cannot read card details typed into a cross-origin iframe such as Stripe’s hosted fields or Adyen’s. It can still add a fake card form to your page or replace the real one, as two kits did in November 2026. You still need to control the scripts on the pages around the payment form.
How do I know if my checkout has a skimmer?
Often you cannot tell from the outside, because orders still go through. In the breach notices we reviewed, skimmers ran for a median of 177.5 days before the store became aware. List the scripts on your checkout, read the custom code in your vendor accounts, test the payment step on a phone and set alerts for changes to scripts on payment pages.
Give every checkout script an owner
The largest Magecart attacks of 2026 reached checkouts through scripts the stores had chosen to load: a testing tool, a pixel, a banner or a widget. One changed vendor file was enough, and none of it touched the stores’ own code or patches.
What protects a checkout is a short list of approved scripts on the payment pages with one owner, a strict Content Security Policy on those pages, card fields from your payment provider, and an alert that reaches a named person when a script changes. PCI DSS already asks for most of this, and the scripts on your checkout will change again before your next assessment, so the list you make this week is worth keeping current.
Ask us to review the scripts on your checkout and payment pages, and we will tell you what we found and what to change.






























Share on: