Skip to content Use Monity from Claude, ChatGPT or Codex: set up monitors and ask what changed, from a chat. Use Monity from Claude, ChatGPT or Codex Connect yours
Tutorial 5 min read

Formjacking and web skimming: how to detect it

How formjacking and web skimming work, the ways to detect a skimmer and what each one misses, what PCI DSS 6.4.3 and 11.6.1 ask for, and how to watch a checkout’s scripts with Monity.

Alex Lead Product Designer
UpdatedNovember 25, 2026 Read time5 min AudienceE-commerce security, IT and compliance teams

Formjacking, also called web skimming, e-skimming or Magecart, is malicious JavaScript added to a checkout or form page that copies what shoppers type, usually card details, and sends it to the attacker’s server. You detect it by knowing every script your payment pages run and every place they send data, and by getting an alert when either changes; Content Security Policy reports, subresource integrity and outside checks of the live page each catch part of it. Monity (monity.ai) does the outside check: its Script & connection watch loads your checkout in a real browser on a schedule and alerts on new script sources, changed scripts and new data destinations.

How a formjacking attack works

  1. The way in: a third-party script the page already loads (analytics, chat, a reviews widget) is changed at its source, or the attacker adds code through the CMS, a plugin, a tag manager or the site’s own files.
  2. What runs: code in the shopper’s browser that reads the card fields, or swaps the payment form, and sends the data to a domain that looks harmless.
  3. Why nobody notices: the order goes through as usual. The shop’s servers look normal, because the theft happens in the customer’s browser.

A well-documented case is British Airways. The UK Information Commissioner’s penalty notice of 16 October 2020 describes customer payment card data being sent to a site called “BAways.com”, with 429,612 people affected on BA’s estimate, and a revised penalty of £20m.

How to detect formjacking

Method What it catches What it misses
An inventory of payment-page scripts Unknown or unneeded scripts, at the time you review Anything that changes between reviews
Content Security Policy with reporting Scripts and connections to sites not on your list, reported by visitors’ own browsers, and blocked if you enforce it A skimmer served from a site you allow, such as a compromised vendor or your own domain, and inline code if the policy allows it
Subresource integrity A third-party file that changed: the browser refuses to run it Scripts that change by design and can’t be pinned, inline code, and your own files
File integrity monitoring on your server Changed files on your own server Third-party scripts and tag-manager additions, which never touch your server
Outside checks of the live page (Monity) New script sources, changed script content, new data destinations, removed integrity hashes, changed security headers, as a shopper’s browser receives the page Skimmers that load only for some visitors, and anything that comes and goes between checks
In-browser protection tools Script behaviour in every real visitor’s session, often with blocking Depends on the vendor; it adds a script to every page

No single method is enough. A common set is an inventory, a Content Security Policy in report mode at least, integrity hashes where scripts are fixed, and an alert when the live page changes.

What PCI DSS asks for

Two PCI DSS v4.0.1 requirements for payment pages took effect on 31 March 2025, per the PCI Security Standards Council:

  • 6.4.3: manage every script that runs on the payment page in the shopper’s browser, confirm each one is authorized, assure its integrity, and keep “an inventory of all scripts … with written justification as to why each is necessary.”
  • 11.6.1: “a change- and tamper-detection mechanism” that alerts on unauthorized changes to the security-impacting HTTP headers and script contents of “payment pages as received by the consumer browser”, at least weekly or as often as your targeted risk analysis says.

In January 2025 the Council removed 6.4.3 and 11.6.1 from SAQ A and added an eligibility criterion instead: merchants must “confirm their site is not susceptible to attacks from scripts that could affect the merchant’s e-commerce system(s).” It adds that the change does “not remove or diminish the underlying requirements within PCI DSS.” For the compliance side, see PCI DSS 6.4.3 and 11.6.1 script monitoring.

Detect formjacking with Monity

  1. Scan a page now, free and without an account, with the website script scanner: every script the page runs, injected ones too, with vendor, hash and integrity status, and where it sends data.
  2. Add a page monitor on the page that takes the card. A payment page usually sits behind a basket, so add steps that run before each check (add a product, open the basket, go to checkout), or sign in with a saved session (saved sessions are on paid plans and the Business trial).
  3. Turn on Script & connection watch. It’s on every plan, the free one included, and uses no extra credits. Each check lists every script (address, first or third party, vendor, size, SHA-256, integrity) and every place the page sends data (fetch, XHR, beacons, websockets, form posts). Approve the origins you’ve reviewed; they stay listed and never alert.
  4. Keep the default rules. They alert on a script source the page hasn’t used in 30 days, a script whose content changed and held on two checks, new or suspicious inline code on a payment page, data sent to a new destination, integrity removed, a form or card frame that points somewhere new, and changed security headers.
  5. Check often. One checkout page checked every hour uses about 720 credits a month, which fits Personal Small ($12 a month, $10 billed yearly). Every 15 minutes uses about 2,900, which fits Business Small ($35 a month or $25 billed yearly, 3 seats). See plans and credits.
  6. Send alerts to the people who act: a security channel in Slack or Microsoft Teams, email, or a signed webhook into your ticketing.
A Monity page check with a monitoring skill’s report: the SEO audit skill on monity.ai’s home page, score 99
Monitoring skills report on every check of a page monitor, here the SEO audit skill on monity.ai’s home page on 24 November 2026. Script & connection watch is a skill too, and reports on the same visit.

How Monity fits alongside CSP and SRI

  • An outside view, on a schedule. Monity loads your checkout in a real browser on the schedule you set and alerts when its scripts, data destinations or security headers change. An enforced Content Security Policy does the blocking in visitors’ browsers; the two work together.
  • One visit’s view, plus your visitors’. Each check records the scripts and destinations seen on that visit. CSP reports from real visitors cover skimmers that load only for some countries, devices or returning visitors.
  • A dated record for your assessor. Monity keeps the script inventory, the origins you approved and dated alerts, as evidence for PCI DSS 6.4.3 and 11.6.1 reviews.

More: website security monitoring, which also watches security headers and the SSL certificate.

FAQ

Questions people ask

What is formjacking?

Malicious JavaScript added to a checkout or other form page that copies what visitors type, usually card details, and sends it to an attacker. It is also called web skimming, e-skimming or Magecart.

How do I know if my website has a skimmer?

Compare the scripts and data destinations your payment page has today with the ones you approved. A script from a site you don’t recognise, a third-party file whose content changed, or data posted to an unfamiliar domain are the usual signs. A free script scan shows them for one page.

Does a Content Security Policy stop formjacking?

It helps: an enforced policy blocks scripts and connections to sites you haven’t listed, and its reports show attempts from real visitors. It doesn’t stop a skimmer served from a site you allow, such as a compromised vendor or your own domain.

What is the difference between formjacking and Magecart?

Formjacking and web skimming name the technique. Magecart is the name security researchers gave the groups behind many of these attacks, and it is often used for the technique too.

What do PCI DSS 6.4.3 and 11.6.1 require?

6.4.3: authorize every script on the payment page, assure its integrity and keep an inventory with a reason for each. 11.6.1: a change- and tamper-detection mechanism that alerts on unauthorized changes to the page’s scripts and security headers as the browser receives them. Both took effect on 31 March 2025.

What does Monity do when a skimmer appears?

It alerts you on the next check: the new script source, the changed script or the new data destination, so your team can remove the code. To block unlisted scripts in shoppers’ browsers as well, pair it with an enforced Content Security Policy.

Written by

Alex

Alex leads product design at Monity. From the plain-English setup to the way an alert is laid out, her work is about making website monitoring something anyone can use, technical or not. She writes here about product design and usability.

More by author
Kamil, Alex and Martyna A person replies within two working days

Have a question?

Pricing, security or scoping: pick one and your message goes to a person on the team.