An online store is a busy intersection of valuable things: customer identities, payment flows, loyalty balances, inventory and a brand that depends on trust. Attackers know that a single weakness — a vulnerable plugin, a reused administrator password, a tampered script on the checkout page — can be converted directly into money. Security for e-commerce is therefore not an IT afterthought. It is part of protecting revenue.

This article walks through the threats retailers meet most often and the practices that meaningfully reduce them, whether you run a hosted platform, a headless storefront or a fully custom build.

The threats that matter most

Payment-page skimming

Client-side skimming attacks inject malicious JavaScript into checkout pages — often through a compromised third-party script, analytics tag or plugin — to capture card details as customers type them. Because the payment itself still succeeds, these attacks can run unnoticed for weeks.

Account takeover and credential stuffing

Automated tools replay usernames and passwords leaked from other sites against your login page. Successful logins are then used to drain gift card balances, redeem loyalty points or place orders with saved payment methods.

Vulnerable extensions and components

Themes, plugins and integrations add functionality quickly, but each one brings code you did not write. Abandoned or unpatched extensions are a recurring entry point.

Business logic and API abuse

Coupon stacking, negative quantities, manipulated prices in requests, refund fraud and scraping of inventory or pricing all exploit how the application behaves rather than a classic software bug. Mobile apps and headless front ends widen the exposure because more logic is reachable through APIs.

Attacks on staff

Phishing aimed at store administrators, customer-service agents and finance teams can hand an attacker the back office, the payment settings or supplier bank details.

Core practices for every store

Reduce your payment card scope

The most effective step is to avoid handling raw card data at all. Hosted payment pages, payment fields embedded from your provider and tokenisation keep card numbers off your servers and shrink the part of your environment that falls under the Payment Card Industry Data Security Standard. PCI DSS v4.0 also introduced explicit expectations for payment pages: an inventory of every script that runs there with a justification for each (requirement 6.4.3), and a mechanism to detect unauthorised changes to the page and its security-relevant headers (requirement 11.6.1). Even when your provider hosts the card form, review how these requirements apply to the page that loads it.

Control what runs in the browser

  • Deploy a strict Content Security Policy that limits where scripts can load from, and collect its violation reports.
  • Use Subresource Integrity for third-party scripts served from fixed URLs.
  • Restrict tag-manager access tightly; it is effectively the ability to publish code to production.
  • Monitor checkout pages for unexpected script changes.

Protect customer accounts

  • Offer passkeys or multi-factor authentication to customers, and require it for everyone with administrative access.
  • Apply rate limiting, bot detection and breached-password checks to login, registration and password-reset flows.
  • Notify customers of new-device sign-ins, password changes and edits to delivery addresses.
  • Avoid revealing whether an email address is registered in login or reset responses.

Keep the platform patched and lean

Maintain an inventory of every extension, theme and integration, with a named owner for each. Remove anything unused, subscribe to security advisories for the rest, and apply critical patches within days rather than at the next quarterly release. On self-hosted platforms, keep the administration interface off the public internet or behind an identity-aware proxy.

Secure APIs and business logic

Validate prices, quantities and discounts on the server, never trusting values sent by the browser or app. Enforce authorisation on every object an API returns, so one customer cannot read another's orders simply by changing an identifier — the leading risk in the OWASP API Security Top 10.

Log, monitor and prepare

Centralise logs from the storefront, payment provider, administration panel and web application firewall. Alert on patterns such as bursts of failed logins, sudden spikes in refunds, new administrator accounts or changes to payment settings. Keep tested, isolated backups of catalogue and order data so that a ransomware incident does not take the store offline for days.

Test before attackers do

Automated scanners find known vulnerabilities, but logic flaws and checkout manipulation need a human tester who thinks like a fraudster. A web application penetration test aligned with the OWASP Web Security Testing Guide (WSTG), covering the storefront, APIs and mobile apps, should run at least annually and after significant changes such as re-platforming or a new payment integration.

A peak-season readiness checklist

  1. Freeze non-essential changes to checkout and payment code in the weeks before major sales.
  2. Review every administrator account and remove stale ones.
  3. Confirm that bot protection and rate limits are tuned for expected traffic.
  4. Verify backups and rehearse restoring the catalogue and order database.
  5. Brief customer-service staff on social-engineering attempts to change account details.
  6. Agree who is on call and how incidents are escalated during the busiest days.

Practical takeaways

  • Shrink card-data scope with hosted or tokenised payments, then govern every script on the payment page.
  • Treat administrator and tag-manager access as production privileges.
  • Defend logins against automation, not just password guessing.
  • Test business logic, not only software versions.

Elytrix Labs helps retailers assess storefronts, APIs and payment flows and align them with PCI DSS. Explore our security testing services or request a scoped quote for your store.

Written by

Elytrix Labs Offensive Security Team

Field notes from the Elytrix Labs consultants, analysts and instructors who run our engagements and teach our courses. Every article is reviewed by a practising specialist before publication.

Meet the team behind Elytrix Labs

Get the monthly security briefing

One concise email a month with new threats, practical defences and upcoming courses. No spam — unsubscribe anytime.

Subscribe to the security briefing