Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 479

Formjacking

Reviewed byCybersecurity entrepreneur & security researcher

What is Formjacking?

FormjackingAn attack in which malicious JavaScript intercepts form submissions in a victim's browser and sends the entered data to a server controlled by the attacker.


Formjacking hijacks the submission flow of any HTML form — login, checkout, account update — inside the user's browser. The attacker compromises a vulnerable web application, an admin account, or more often a third-party script (chat widget, analytics, A/B-test, payment SDK) and inserts JavaScript that hooks the form's submit event or keyup handlers. Captured credentials, card numbers, addresses, and PII are beaconed to a remote endpoint while the legitimate request still completes, so the victim sees a normal confirmation and notices nothing. Symantec, which popularised the term, reported skimmers on thousands of sites per month at the peak.

Named incidents define the pattern. The British Airways breach (21 Aug–5 Sep 2018) skimmed roughly 400,000 cards and drew an ICO penalty finalised at £20 million in October 2020 (reduced from a proposed £183.39 million). Ticketmaster UK was compromised through Inbenta's chatbot script, and Newegg was skimmed for about a month in 2018 — all attributed to Magecart groups.

Defences include a strict Content Security Policy (nonces, strict-dynamic), Subresource Integrity, runtime client-side monitoring, and PCI DSS v4.0 requirements 6.4.3 (authorise, inventory, and verify the integrity of every payment-page script) and 11.6.1 (tamper-detect page and header changes), mandatory since 31 March 2025.

flowchart LR
  A[Attacker compromises site<br/>or third-party script] --> B[Injects skimmer JS]
  B --> C[Victim loads checkout page]
  C --> D[User submits form]
  D --> E[Skimmer hooks submit / keyup]
  E --> F[Copies card + PII]
  F --> G[Beacons to look-alike domain]
  D --> H[Legit request still completes]
  H --> I[User sees normal confirmation]

● Examples

  1. 01

    An injected script on a login page captures usernames and passwords as users submit them.

  2. 02

    A tampered third-party checkout script exfiltrates card and address data to a look-alike domain while the real purchase still completes.

● Frequently asked questions

What is Formjacking?

An attack in which malicious JavaScript intercepts form submissions in a victim's browser and sends the entered data to a server controlled by the attacker. It belongs to the Attacks & Threats category of cybersecurity.

What does Formjacking mean?

An attack in which malicious JavaScript intercepts form submissions in a victim's browser and sends the entered data to a server controlled by the attacker.

How do you defend against Formjacking?

Defences for Formjacking typically combine technical controls and operational practices, as detailed in the full definition above.

What are other names for Formjacking?

Common alternative names include: Form skimming, Client-side form theft.

● Related terms