Back to blog
Cybersecurity7 min read

Ecommerce Cybersecurity: A Specific Guide for Online Retailers

Ecommerce cybersecurity guide: carding, ATO, Magecart defenses, PCI DSS compliance, 3DS2, tokenization, and an audit checklist for online stores.

Contents

Ecommerce is a high-value target because it concentrates everything attackers want in one place: payment data, customer identities, loyalty balances, and a checkout flow that must stay open 24/7. Unlike generic corporate environments, an online store cannot simply block traffic when something looks suspicious. Every false positive is a lost order, and every missed attack is chargebacks, fines, and brand damage.

The threat profile is also specific. Bots testing stolen cards at checkout, credential stuffing against customer accounts, and JavaScript skimmers injected into third-party tags behave very differently from the ransomware and phishing scenarios most security programs are tuned for. Generic WAF rules and a yearly pentest will not catch them.

This guide covers the threats that matter for online retail, what PCI DSS actually requires from your team, the technical stack for fraud prevention, how 3DS2, tokenization, and encryption at rest fit together, and a practical audit checklist you can run against your store this quarter. For broader context on the enterprise threat landscape, see our 2026 enterprise cybersecurity guide.

Ecommerce-specific threats: carding, account takeover, Magecart

Carding is the automated testing of stolen card numbers against your checkout, typically with low-value authorizations to validate which cards are still live. The damage is not only fraud losses: card networks monitor authorization-to-capture ratios, and sustained carding activity can push you into excessive decline programs with Visa or Mastercard, with monthly fines that compound quickly [VERIFY: current VAMP and Mastercard ECM fine thresholds 2026, source: Visa/Mastercard merchant bulletins].

Account takeover (ATO) targets your registered customers. Attackers use credential lists leaked from other breaches and replay them against your login. Once inside, they drain loyalty points, change shipping addresses, and place orders with saved payment methods. ATO is particularly damaging because the transaction looks legitimate to your fraud engine: correct password, known device fingerprint history, stored card.

Magecart is the umbrella term for client-side skimming: malicious JavaScript injected into your checkout page, usually through a compromised third-party tag (analytics, chat widget, A/B testing). The script reads card data from the DOM before it reaches your payment processor. It does not trigger server-side alerts because the exfiltration happens in the customer's browser. Client-side monitoring and a strict Content Security Policy are the only reliable defenses. For a broader view of common web attacks, review the most frequent cyberattacks on websites.

PCI DSS: what applies and how to comply

PCI DSS v4.0.1 is the current standard, with the full set of future-dated requirements enforceable from March 31, 2025. Every merchant that stores, processes, or transmits cardholder data is in scope, but the depth of compliance depends on your transaction volume and how you handle card data.

The practical question is which Self-Assessment Questionnaire (SAQ) you qualify for:

  • SAQ A: fully outsourced ecommerce. Checkout is a redirect or iframe served by a PCI-compliant provider (Stripe, Adyen, Mercado Pago). Your site never touches the card number. This is the lowest-burden path and the recommended architecture for most retailers.
  • SAQ A-EP: your site controls the checkout page but posts card data directly to a processor. Scope is much larger because any script on your checkout page is in scope.
  • SAQ D: you store or process card data yourself. Full PCI DSS applies. Only justified for marketplaces or very large merchants with specific reasons.

Two v4.0.1 requirements deserve attention for ecommerce: 6.4.3 (inventory and integrity control of all scripts loaded on payment pages) and 11.6.1 (change detection on payment page headers and scripts). These exist specifically because of Magecart and apply even to SAQ A merchants in most interpretations [VERIFY: exact SAQ A applicability of 6.4.3 and 11.6.1 under v4.0.1, source: PCI SSC FAQ].

Fraud prevention: the technical stack

A modern fraud stack is layered. No single control catches everything, and over-tuning any one layer kills conversion.

Layer Purpose Typical tools
Edge / bot management Block carding and credential stuffing before they hit checkout Cloudflare Bot Management, Akamai, DataDome
Device and behavior Fingerprint devices, detect automation, score sessions Sift, Forter, Signifyd, Riskified
Transaction scoring Decide approve / review / decline per order Processor-native (Stripe Radar, Adyen RevenueProtect) or specialist
Identity and ATO Detect credential stuffing, impossible travel, MFA step-up Auth0, Okta CIC, custom rules on login endpoint
Client-side integrity Detect script injection and DOM tampering on checkout Jscrambler, c/side, Akamai Page Integrity Manager

The governance model matters as much as the tools. Fraud rules decay: cart abandonment rates drift, attackers rotate tactics, and a rule that made sense in Q1 will reject loyal customers by Q3. Plan for monthly rule review and a clear owner for the fraud P&L — usually shared between payments, risk, and engineering.

3DS2, tokenization, and encryption at rest

3DS2 (EMV 3-D Secure 2) shifts liability for fraudulent transactions from the merchant to the issuer when authentication succeeds. Unlike 3DS1, it exchanges ~100 data points with the issuer in the background, so most transactions go through frictionless (no customer challenge). Use it selectively: mandatory in the EU under PSD2 SCA, optional but valuable in the US and LATAM for high-risk orders. Trigger 3DS2 on risk signals, not on every transaction, to protect conversion.

Tokenization replaces the PAN (card number) with a non-sensitive token. There are two flavors worth distinguishing:

  • Gateway tokens (Stripe, Adyen): the token is usable only within that processor. Good for compliance scope reduction, bad for portability.
  • Network tokens (Visa Token Service, Mastercard MDES): issued by the card network, portable across processors, and automatically updated when the underlying card is reissued. Network tokens typically lift authorization rates by 2–6 percentage points [VERIFY: Visa/Mastercard 2026 network token auth lift benchmarks].

Encryption at rest covers any cardholder data, PII, or credentials you store. AES-256 with keys managed in a dedicated KMS (AWS KMS, GCP KMS, Azure Key Vault) is the baseline. The real discipline is key rotation, separation of duties between who can decrypt and who can administer keys, and encrypted backups. Database-level TDE alone is not sufficient if application-level access is unrestricted.

Ecommerce security audit: checklist

Run this checklist at least twice a year and after any major platform change (replatforming, new payment provider, headless migration).

Perimeter and infrastructure

  • WAF in blocking mode with ecommerce-specific rule set (OWASP + carding patterns)
  • Bot management on /login, /checkout, /api/cart, /gift-card/balance
  • Rate limiting per IP, per device, and per account on authentication endpoints
  • TLS 1.2 minimum, HSTS enabled, valid certificate chain

Application and checkout

  • Inventory of every script loaded on the payment page, with integrity hashes
  • Content Security Policy in enforce mode, reviewed quarterly
  • Subresource Integrity (SRI) on all third-party scripts where supported
  • No card data in application logs, error messages, or analytics payloads

Identity and accounts

  • MFA available for all customer accounts; mandatory for admin and staff
  • Password policy aligned with NIST 800-63B (length > complexity, breached-password check)
  • Step-up authentication on address change, new payment method, and high-value orders

Data and compliance

  • Current SAQ on file, signed by a qualified officer
  • Data retention policy enforced (no expired card data, minimized PII)
  • Encryption at rest verified, KMS key rotation documented
  • Incident response plan tested in the last 12 months, including card brand notification timelines

For architectural support on the cloud security layer, review our cloud security service.

Next step

If you are replatforming, scaling into new markets, or preparing for a PCI assessment, the gap between "we have security tools" and "our checkout is actually defensible" is usually wider than expected. Contact us for a 30-minute diagnostic of your ecommerce security posture, with concrete findings on PCI scope, fraud stack, and client-side risk.

Frequently asked questions

Do I need PCI DSS if I use Stripe or Mercado Pago?

Yes. Using a compliant processor reduces your scope, typically to SAQ A, but it does not eliminate the obligation. You still need to complete the SAQ annually, maintain script integrity on payment pages (requirements 6.4.3 and 11.6.1), and keep a signed Attestation of Compliance on file.

Does 3DS2 hurt conversion?

Applied to every transaction, yes. Applied selectively — only on orders your risk engine flags — it typically improves net conversion because the liability shift reduces chargebacks and lets you approve borderline orders you would otherwise decline. Most processors expose a dynamic 3DS mode for this.

How do I detect a Magecart attack?

Server-side monitoring will not see it. You need client-side script monitoring that detects new scripts, modified scripts, or exfiltration calls to unexpected domains from the checkout page. A strict CSP with report-uri is the minimum; dedicated tools (Jscrambler, c/side, Akamai Page Integrity Manager) give you real-time alerts.

What is the difference between gateway tokens and network tokens?

Gateway tokens are issued by your payment processor and only work within that processor. Network tokens are issued by Visa or Mastercard directly, work across processors, and auto-update when the underlying card is reissued or expires. Network tokens generally deliver higher authorization rates and lower fraud.

How often should I run a security audit on my store?

At minimum twice a year, plus after any structural change: replatforming, new payment provider, headless migration, or a new third-party tag on checkout. PCI DSS v4.0.1 also requires continuous activities (script inventory, change detection) that are not one-time audits.

Is MFA enough to stop account takeover?

It stops most credential stuffing, but not all. Attackers use session hijacking, SIM swap, and phishing kits that proxy MFA codes. Combine MFA with device fingerprinting, anomaly detection on login, and step-up authentication on sensitive actions (address change, new payment method).

Need to strengthen your platform security?

Schedule a free assessment with our team.

Talk to an expert

Related articles