If you are asking what tools detect unauthorized changes to payment page JavaScript, start with the one job such a tool has: compare what the customer’s browser actually ran against what you authorised it to run, then tell you when the two differ. That is the whole of it. It is not fraud screening, it is not a WAF, and it is not a vulnerability scan. Those answer different questions.
Most pages written on this subject either sell one sensor or paraphrase the text of PCI DSS 11.6.1 back at you. What follows compares six categories of detection that merchants actually run, and is specific about what each one cannot see. Every category has a hole in it. Knowing where the hole sits is the only way to build a stack that covers your checkout rather than your paperwork.
What a detection tool actually has to catch
Two requirements, two different jobs
PCI DSS 4.0.1 splits the work. Requirement 6.4.3 asks for an inventory of every script loaded and executed in the payment page, each one authorised, each one with a written business justification, each one integrity-assured. Requirement 11.6.1 asks for a mechanism that detects and alerts on unauthorised modification to the scripts and the HTTP security headers of the payment page as received by the consumer browser, running at least weekly unless a targeted risk analysis justifies a different frequency. Both were future-dated until 31 March 2025 and are now in force. The current documents sit in the PCI SSC document library, and the split is covered in more depth in our breakdown of what 6.4.3 and 11.6.1 ask of your payment page.
One is a list. The other is an alarm. A tool that only produces a list satisfies neither on its own.
The browser is the scene, not your origin
Read 11.6.1 literally: as received by the consumer browser. That wording was chosen deliberately, because the HTML your origin serves and the code that eventually runs in Chrome on a Samsung phone in Leeds are routinely not the same thing. Second-stage loaders fetch the payload after page load. Payloads check user agent, screen size, time zone or the first six digits of the card as it is typed. Some skimmers only inject when a card field gains focus. Fetch the page with curl and you will see nothing wrong, because nothing is wrong yet.
Three routes in, three different detection problems
Changes arrive by one of three doors: a third-party supplier whose own code is modified, your first-party code altered after someone obtained access, or an unpatched or end-of-life platform compromised wholesale. The route decides which tool can see anything at all. Server-side integrity checks are blind to the first. CSP origin reporting is blind to the first as well. Nothing on your server sees a change on someone else’s. Eight worked examples of these routes are set out in our write-up of high-profile Magecart attacks.
If your card fields sit in a hosted iframe
You still own the problem. The parent page that frames the iframe is the page an attacker rewrites: overlay a fake form on top, swap the iframe src, or simply read the keystrokes before the real field ever receives them. Hosted payment fields are the cheapest risk reduction available and you should use them, but monitoring the parent is not optional. The iframe moves the card data out of your DOM. It does not move the attacker out of your page.
The six tools, and the blind spot in each
1. CSP violation reporting
Deploy a Content-Security-Policy-Report-Only header on the checkout path, point report-to (or legacy report-uri) at a collector, and every unexpected script origin, inline block and outbound connection becomes a dated record generated by real customer sessions on real devices. No synthetic shopper required. A new exfiltration host appearing in connect-src, an injected inline block under a nonce policy, a rewritten form-action on the submit handler: all three surface within minutes. The working configuration is laid out in our guide to Content Security Policy for a checkout page.
The blind spot is structural. CSP is a change feed for origins, not for code. If a supplier you already allowlisted ships modified JavaScript from the same URL, every browser loads it happily and your collector stays silent. Exfiltration routed through an origin you already permit is equally invisible; Kaspersky documented skimmers posting stolen card data through Google Analytics endpoints in June 2020, and an analytics-shaped request to an analytics host raises nothing.
Budget a week for noise. Browser extensions, injected ISP toolbars and antivirus shims will flood the endpoint on day one. Filter on chrome-extension: and moz-extension: schemes, scope reports to the checkout path, dedupe by blocked URI, and only then start treating new entries as signal.
Best for
- First-party injection and any payload that calls home to a new host
- Evidence drawn from genuine customer sessions, not a test run
Pros
- Free, continuous, and reports header-level policy changes as a side effect
- Report-only mode carries no breakage risk while you tune
Cons
- Silent when an allowlisted supplier modifies its own file
- Noisy until filtered; no visibility inside a third-party iframe
2. Script inventory with hash diffing, and SRI as the enforcement step
Build the inventory from the rendered DOM, not the source template. Load the payment page in a headless browser, enumerate every script that executed, and record the URL, a SHA-384 hash of the body, the owner, and the business justification. One artefact then answers 6.4.3 and feeds 11.6.1, which is the only sane way to maintain it.
Subresource Integrity is the blocking version of the same idea, and it is the defence that actually bites on a static library. It also fails in practice for a predictable reason: the supplier ships new code without warning, the hash mismatches, the script is blocked, checkout breaks, and at 9pm someone deletes the integrity attribute to get orders flowing. Pin what you can pin. For anything a supplier rotates on its own schedule, either self-host a reviewed copy you control, or treat hash drift as a high-priority alert rather than a hard block.
Pull your Google Tag Manager container version IDs and publish permissions into the same inventory, because this is the one route where CSP and SRI offer nothing. A tag published inside a container you already allowlisted executes with full permission, from a trusted origin, with no new script tag in the waterfall. Detection there means container version history, a periodic audit of who holds publish rights, and an alert on every new container version. Almost no monitoring product covers it.
One discipline matters more than the tooling: diff against a signed-off baseline, not against yesterday. A rolling comparison quietly accepts whatever was injected yesterday.
Best for
- Supplier code modified at a URL you already trust
- Producing the 6.4.3 inventory and the 11.6.1 change record from one process
Pros
- Catches exactly what CSP misses
- Hashes and justifications are the artefact assessors ask for first
Cons
- SRI maintenance cost on frequently rotated third-party code
- Useless if the baseline is never formally approved
3. Synthetic checkout runs in a headless browser
A Playwright or Puppeteer script that adds an item, walks through to the card step, captures every script body and every outbound request, and diffs the lot against the approved baseline. Thirty lines to start. Run it in CI on every deploy and on a schedule in between.
Vary the run. Different egress countries, mobile and desktop user agents, a real test card flow where your gateway supports one, because conditional payloads gate on geography, device and card range. A skimmer that only fires for UK-issued BINs will sail past a synthetic shopper running from a US data centre with a stock headless user agent.
Be honest about cadence. A weekly run finds a Tuesday injection on the following Monday, and a payload that fires for one session in fifty may never meet your robot at all. What these runs are very good at is evidence: timestamped, reproducible, diffable, and trivially easy to hand to a QSA or an acquirer who asks what you were doing in March.
Best for
- Deploy-time regression checks and dated proof of weekly testing
- Catching changes anywhere in the full rendered page, including headers
Pros
- Open source, cheap to run, no vendor on your checkout
- Captures what the browser receives, not what the origin serves
Cons
- Point-in-time by nature; misses low-rate and targeted payloads
- Needs multi-region execution to be worth much
4. Server-side file integrity and code review tooling
File integrity monitoring against a known-good artefact, git diff against the deployed build, and platform checksum verification such as WP-CLI’s wp core verify-checksums on WooCommerce. This family is strong against exactly one thing: first-party source files edited after someone obtained access. In 2018 British Airways had a first-party script on its own page modified to post card data to a lookalike domain; a deployment diff, or a reporting connect-src policy, would have surfaced that quickly. The ICO’s £20m penalty in October 2020 is on the public record at the Information Commissioner’s Office.
The gap is the one that keeps Magento merchants awake. Payloads stored in the database leave file hashes perfectly clean: CMS blocks, layout XML, email templates, and the design/head/includes row in core_config_data that maps to the Scripts and Style Sheets box in the admin. During the Magento 1 campaign of September 2020, Sansec reported roughly 2,000 stores compromised over a single weekend through an unpatched end-of-life platform, and plenty of them reinfected after a file-level clean-up because nobody diffed the database.
Check persistence alongside the payload: cron entries, unfamiliar admin accounts, integration tokens and scheduled tasks that quietly restore the skimmer a fortnight later. And accept the hard limit. Nothing on your server will ever see a change on a supplier’s server.
Best for
- Self-hosted Magento, WooCommerce and bespoke stacks
- Confirming whether a compromise reached your own code or config
Pros
- Cheap, fast, and tells you where to start a clean-up
- Catches the persistence mechanisms other tools never look at
Cons
- Blind to database-stored injection unless you diff config and content tables too
- Blind to every third-party route
5. Client-side monitoring agents on the live payment page
A commercial payment page sensor runs in the customer’s browser and reports what happened there: every script execution, every outbound connection, every read of a card field, in real time, across real sessions. That is a different data source from everything above. It is the only category that reliably catches a trusted supplier turning bad mid-session, which is precisely the Ticketmaster UK scenario of June 2018, where a compromised chat supplier served altered code from an origin the site already allowed.
The alert trail tends to satisfy assessors because it is tamper-evident, continuous and attributable to a timestamp. Weigh the trade-offs properly, though. You are adding another third-party script to the checkout, so it belongs in your own inventory and allowlist like any other. The agent also stops at the iframe boundary; it sees the parent page, not your gateway’s hosted field.
Four questions before you sign: does it alert on HTTP header changes as well as script changes, where is the session data processed and stored, what is the sampling rate, and what happens to detection if the vendor’s collection endpoint is unreachable.
Best for
- High-volume merchants and anyone with many third-party tags on checkout
- Continuous 11.6.1 coverage without a weekly manual run
Pros
- Detects supplier compromise and conditional payloads that only fire for real users
- Alert history maps neatly onto assessor expectations
Cons
- Recurring licence cost, and one more script executing beside your card fields
- No visibility inside the payment iframe
6. Outside signals: acquirer CPP reports, URL scanners and customers
Your acquirer’s common point of purchase letter is genuine detection. So is a public scanner such as urlscan.io, and so is the customer who emails to say their card was used in Dubai an hour after ordering from you. All three work. All three usually arrive weeks after the first card was stolen, which makes them a backstop, not a control.
Reputation and blocklist tooling is weaker still. Payloads hosted in blockchain contracts, the EtherHiding technique documented by Guardio Labs in October 2023, have no domain to block and no file to scan. Behaviour-based alerting on unexpected outbound connections from the payment page holds up far better than any list of bad hosts, because the exfiltration still has to leave the browser somehow.
Best for
- Catching what every internal control missed
- Confirming an incident is real before you pull the checkout apart
Pros
- No cost, no deployment
- CPP data is authoritative and hard to argue with
Cons
- Latency measured in weeks; by then the loss is already crystallised
- Fails entirely against blockchain-hosted and reputation-free payloads
A minimum viable stack, mapped to the three routes
For a small merchant on a hosted platform with gateway-hosted card fields: CSP in report-only mode with a collector scoped to the checkout path, a scripted synthetic run in CI at least weekly, and a signed-off inventory that includes your GTM container version and publish permissions. That covers first-party injection, platform change and the tag manager route, for the price of some engineering time. Supplier modification remains partly uncovered unless you hash-diff the scripts you can.
For a bespoke or self-hosted Magento checkout, add server-side file integrity monitoring against the deployed build, a scheduled diff of the config and content tables where scripts can hide, SRI or self-hosting for pinnable third-party code, and a patch SLA short enough to matter. If you take meaningful card volume, a client-side monitoring agent is the realistic way to close the supplier gap in real time rather than once a week.
The evidence to keep
Assessors and acquirers ask for artefacts, not architecture diagrams. Keep inventory versions with a name and date against each approval, the full alert history including the alerts you dismissed and why, run timestamps and output from every synthetic check, and a short written record of what you did when something fired. The dismissal reasoning matters more than people expect; a stack with no false positives on record usually means nobody is reading the reports.
One note on scope, correct at the time of writing. In January 2025 the Council revised SAQ A under v4.0.1 so that 6.4.3 and 11.6.1 no longer appear in it, replacing them with an eligibility criterion that the merchant confirms its site is not susceptible to attacks from scripts affecting its e-commerce site. Read plainly, that is not an exemption. It is the same question asked once a year instead of weekly, and you still need something that can answer it.
If you want the mechanics rather than the comparison, read next on how to tell if your checkout has been skimmed, which covers what to look at in a HAR file and the order to check things in.
Frequently Asked Questions
Does Content Security Policy on its own detect unauthorised changes to payment page JavaScript?
Partly. CSP violation reporting flags new script origins, injected inline blocks, form-action tampering and connections to unexpected hosts, all from real browser sessions. It reports nothing when an allowlisted supplier modifies its own file at the same URL, or when data is exfiltrated through an origin you already permit. Pair it with hash diffing or SRI rather than relying on it alone.
How often does PCI DSS 11.6.1 require payment page change detection?
At least weekly, or at a frequency determined by a targeted risk analysis performed in line with requirement 12.3.1. Weekly is the default, not the recommendation. If you justify a longer interval, the risk analysis has to be documented and reviewed, and most merchants find continuous or per-deploy checking easier to evidence than defending a bespoke frequency.
Can free and open-source tools satisfy 11.6.1, or do I need a paid monitoring service?
Free tooling can satisfy it. A report-only CSP with a collector, a Playwright script run in CI, and a version-controlled inventory with hashes and sign-off will produce the detection, the alerting and the evidence. The trade-off is latency and maintenance: paid agents monitor every live session continuously, which is what closes the gap on supplier compromise and low-rate conditional payloads.
Do I still need script monitoring if my card fields sit inside a hosted iframe?
Yes. The parent page remains yours, and an attacker who can edit it can overlay a fake form, swap the iframe source or capture keystrokes before the real field sees them. Hosted fields cut your scope and your risk substantially, but the page that frames them still needs an inventory and a change alarm.
What evidence from these tools will an acquirer or QSA actually accept?
Dated, attributable output. Inventory versions showing who authorised each script and when, alert logs including triaged false positives, timestamped synthetic run results, and an incident record showing what happened after an alert fired. Screenshots of a dashboard with no history behind it tend to prompt more questions than they answer.
