Checkout Page Skimming in 2026: Why a Hacked Third-Party Script Can Steal Cards From Your Own Website, What PCI DSS 4.0 Requirements 6.4.3 and 11.6.1 Actually Demand, and How to Lock Down Scripts With CSP and Subresource Integrity
- Equipo de Internet Pros
- November 16, 2026
- Redes y Seguridad
Este artículo está disponible solo en inglés.
Your checkout page might be served from your own server, but most of the code it runs is not yours. Analytics tags, chat widgets, A/B testing tools, review badges and tag managers all pull JavaScript from other companies’ servers into the same page where customers type their card numbers. If any one of those suppliers is compromised, the attacker’s code runs with full access to the payment form. This is web skimming, often called Magecart, and in 2026 it is one of the main reasons the card industry now requires merchants to know exactly which scripts load on their payment pages.
How a Script You Trusted Becomes a Card Skimmer
When a browser loads a script tag, that script can read every field on the page, change what the page shows, and send data anywhere. The browser does not care whether the code came from your domain or from a marketing vendor. Attackers know this, so instead of breaking into a well-defended retailer, they break into a small supplier whose script is loaded by thousands of sites, or they slip a line into a tag manager container nobody reviews.
The well-known cases show the pattern:
- British Airways (2018). Attackers changed a JavaScript library on the airline’s own site to copy payment details to a lookalike domain. The UK Information Commissioner’s Office later fined the company £20 million.
- Ticketmaster UK (2018). The skimming code came in through a third-party chatbot script that also loaded on payment pages, leading to a £1.25 million fine.
- Polyfill.io (2024). A popular free script domain changed owners, and researchers found it serving malicious code to visitors of more than 100,000 websites that had embedded it years earlier and forgotten about it.
Modern skimmers are designed to stay hidden. Many activate only on URLs containing “checkout,” skip visitors who have developer tools open, and send stolen data to domains chosen to look like analytics services. The store keeps working normally, so the first sign is often a call from the card processor about fraud traced back to your site.
Every script on your payment page has the same access to the card number as your own code. If you would not let a vendor read your customers’ cards, do not load their script there.
What PCI DSS 4.0 Now Requires
PCI DSS version 4.0 added two requirements aimed directly at this attack. They were best practice at first and became mandatory on March 31, 2025.
| Requirement | What it asks for | In plain terms |
|---|---|---|
| 6.4.3 | Every script that loads and runs in the shopper’s browser on a payment page is authorized, its integrity is assured, and an inventory lists each script with a written justification | Know every script, approve it on purpose, and be able to tell if it changes |
| 11.6.1 | A change- and tamper-detection mechanism alerts staff to unauthorized changes to security-relevant HTTP headers and script contents of payment pages as the browser receives them, checked at least weekly | Watch the live page from the visitor’s side and get alerted when it changes |
There is an important carve-out. In early 2025 the PCI Security Standards Council revised SAQ A, the short questionnaire for merchants who fully outsource card entry through a redirect or an embedded payment iframe. Those merchants no longer have to meet 6.4.3 and 11.6.1 directly, but they must confirm their site is not exposed to script attacks that could affect the payment process. That is not a free pass: a malicious script on the page that hosts the iframe can still swap the iframe for a fake form, or redirect the shopper to a copy of the payment page. Your acquirer may also ask for more than the minimum.
The Two Browser Controls That Do the Heavy Lifting
Subresource Integrity (SRI)
SRI lets you pin a script to an exact version. You add an integrity attribute holding a cryptographic hash of the file, plus crossorigin="anonymous", and the browser refuses to run the script if a single byte differs. Had the Polyfill.io sites used SRI, the swapped code would simply have failed to load.
The limitation is that SRI only works for files that never change. Analytics libraries, tag managers and many vendor widgets update constantly by design, so a pinned hash breaks them. For those, the usual answer is to self-host a reviewed copy, or keep them off the payment page entirely.
Content Security Policy (CSP)
A Content-Security-Policy header tells the browser which sources may run scripts and where the page may send data. Three directives matter most for skimming:
- script-src limits which scripts can run. A policy based on per-request nonces with
'strict-dynamic'is stronger than a long list of allowed domains, since an allowlisted CDN can host an attacker’s file too. - connect-src and img-src limit where the page can send requests. A skimmer that reads the card number still has to send it somewhere, and a tight list blocks the common routes.
- report-to sends violation reports to an endpoint you control, so a blocked injection becomes an alert rather than a silent failure.
Start with the Content-Security-Policy-Report-Only header. It reports violations without blocking anything, so you can see what your pages actually load before you enforce. CSP is not airtight, since determined attackers can find other ways to move data out, but combined with fewer scripts it removes most of the easy paths.
Quick Check: What Is Running on Your Checkout?
Open your payment page in a private browser window, open developer tools, and look at the Network tab filtered to JS. Count the domains. Then compare that list with what your team thinks is there. The gap between the two is usually the most useful finding of the whole exercise.
A Practical Lockdown Plan
- Inventory. List every script on every page that collects or hosts payment data, including scripts loaded by other scripts and by your tag manager.
- Cut. Remove anything without a business reason to be on the payment page. Chat, heatmaps, social pixels and A/B tools rarely need to be there.
- Pin or self-host. Add SRI to static third-party files, or serve reviewed copies from your own domain.
- Restrict the tag manager. Limit who can publish, require review for changes, and exclude payment pages from general marketing tags.
- Deploy CSP in report-only mode, fix what it reports, then enforce it on checkout first.
- Monitor from the outside. Use a script-monitoring service or scheduled checks that load the page like a real shopper and alert on new scripts, changed hashes or changed security headers.
- Prefer hosted payment fields. A processor-hosted iframe or redirect keeps card numbers off your page, which shrinks both the risk and the compliance scope.
En resumen
Web skimming works because modern websites trust code they do not control and rarely check. PCI DSS 4.0 turned “know what runs on your checkout” from good advice into an audit requirement, but the real benefit is practical: a short, pinned and monitored list of scripts is far harder to compromise than a page assembled by a dozen vendors.
Not sure what is loading on your payment pages? Contact Internet Pros for a checkout script audit, a CSP rollout plan and secure payment integration that keeps card data off your servers.
