Skip to main content
Back to blog
April 17, 2026·Updated May 2, 2026|10 min read|Antoine Duno|Ecommerce Security

E-commerce Website Security: Checklist and Best Tools in 2026

E-commerce websites are attacked more frequently than almost any other category of site. The combination of payment data, customer accounts, and high transaction volume makes them valuable targets for automated attacks. This guide covers the security fundamentals, PCI DSS requirements you actually need to understand, and the tools that keep online stores protected.

Antoine Duno

1,843 words

AD

Antoine Duno

Founder of ZeriFlow · 10 years fullstack engineering · About the author

Key Takeaways

  • E-commerce websites are attacked more frequently than almost any other category of site. The combination of payment data, customer accounts, and high transaction volume makes them valuable targets for automated attacks. This guide covers the security fundamentals, PCI DSS requirements you actually need to understand, and the tools that keep online stores protected.
  • Includes copy-paste code examples and step-by-step instructions.
  • Free automated scan available to verify your implementation.

E-commerce Website Security: Checklist and Best Tools in 2026

An e-commerce website is not just a website. It''s a system that handles payment card data, stores customer personal information, manages authenticated sessions with financial value, and processes transactions that criminals have direct financial motivation to interfere with.

The result: e-commerce sites face a disproportionately high volume of automated attacks. Credential stuffing attacks targeting customer accounts. Card testing attacks that use your checkout to validate stolen card numbers. Skimming scripts injected into checkout pages. XSS exploits that steal session tokens. Bot traffic probing for admin panel access.

This guide covers the specific security concerns for e-commerce in 2026 — what you need to understand about PCI DSS, how to configure your checkout security correctly, and the tools that make ongoing protection manageable.


Why E-commerce Is a High-Value Target

The math is simple. Stolen customer credentials can be sold or used for account takeover. Successful card testing generates immediate financial fraud. A compromised checkout page can silently exfiltrate payment card data for weeks before detection. Even a brief availability outage during peak shopping periods causes measurable revenue loss.

The 2025 Verizon DBIR reported that financial gain remains the dominant motive for web application attacks, with e-commerce representing the largest category of targeted sites. The attack methods are largely automated — adversaries run bots that probe thousands of sites simultaneously for known vulnerabilities.

What makes this manageable: the vast majority of attacks target known, preventable vulnerabilities. A correctly configured store with up-to-date software, proper security headers, and continuous monitoring is far less attractive than the next site that hasn''t done those things.


PCI DSS: What E-commerce Sites Actually Need to Know

PCI DSS (Payment Card Industry Data Security Standard) is the compliance framework for payment card data. The version that applies to you depends heavily on how you handle payment data:

The Two Most Common Scenarios

Scenario A: You use Stripe, PayPal, or Square with hosted payment pages

If your customer completes payment on Stripe''s hosted checkout page, PayPal''s checkout, or similar — and card data never touches your server — you qualify for SAQ A (Self-Assessment Questionnaire A). This is the simplest PCI DSS scope. The requirements are:

  • Your site runs over HTTPS
  • You have a vulnerability management program (regular scans)
  • Your employees with access to cardholder data are trained
  • You maintain an incident response plan

Most e-commerce stores using major payment processors qualify for SAQ A and can self-assess. You do not need a Qualified Security Assessor (QSA) engagement.

Scenario B: Payment forms are on your pages

If your checkout page hosts a payment form — even if it submits to a third-party processor — you qualify for a higher SAQ level (likely SAQ A-EP or SAQ D). Card data passing through your application''s browser context, even without server-side handling, expands your scope significantly.

The practical recommendation for most e-commerce stores: use Stripe Checkout, Stripe Payment Element, or PayPal''s hosted flows to stay within SAQ A scope. The UX tradeoff (slightly less control over the payment UI) is almost always worth the compliance simplification.

PCI DSS v4.0 Changes (Effective 2025)

PCI DSS v4.0 introduced requirements that specifically affect e-commerce:

  • Requirement 6.4.3: All scripts loaded on payment pages must be authorized, have documented purpose, and have integrity ensured (via Subresource Integrity or equivalent)
  • Requirement 11.6.1: A change and tamper detection mechanism for payment pages — essentially, monitoring for unauthorized script changes

These requirements effectively mandate that you track what JavaScript runs on your checkout pages and detect if it changes. Tools that monitor Content Security Policy violations and script inventory are becoming compliance requirements, not just best practices.


The E-commerce Security Checklist

SSL/TLS Configuration

  • [ ] HTTPS enforced across the entire site (no HTTP pages at any URL)
  • [ ] HSTS header with minimum max-age=31536000
  • [ ] TLS 1.2 minimum; TLS 1.3 preferred
  • [ ] No weak cipher suites (RC4, 3DES, export ciphers disabled)
  • [ ] Certificate expiry monitoring — alerts at 30 days and 7 days before expiry
  • [ ] Certificate chain complete (no intermediate certificate issues)

Tool for this: ZeriFlow monitors SSL certificate expiry and configuration continuously. SSL Labs for one-time deep TLS analysis.

Mixed Content

  • [ ] No HTTP resources loaded on any HTTPS page
  • [ ] All images, fonts, scripts, and stylesheets served over HTTPS
  • [ ] Third-party embeds (chat widgets, social sharing buttons) use HTTPS
  • [ ] No src="http://..." in any template or product image URL

Mixed content is particularly critical on e-commerce sites. A browser that shows a security warning on a checkout page will lose you sales. A downgrade attack that intercepts an HTTP resource on a payment page is a real attack vector.

Tool for this: ZeriFlow''s Quick Scan includes mixed content detection across your pages.

Content Security Policy for Payment Pages

CSP on payment pages requires careful calibration. Too restrictive and you break Stripe or PayPal''s JavaScript. Too permissive and you''ve defeated the purpose.

Stripe Payment Element CSP requirements:

Content-Security-Policy: 
  default-src ''self'';
  script-src ''self'' https://js.stripe.com;
  frame-src https://js.stripe.com https://hooks.stripe.com;
  connect-src ''self'' https://api.stripe.com;
  img-src ''self'' https://*.stripe.com data:;
  style-src ''self'' ''unsafe-inline'';

What NOT to do:

# Never use this — it defeats CSP entirely
Content-Security-Policy: default-src *; script-src * ''unsafe-inline'' ''unsafe-eval''

The ''unsafe-inline'' and ''unsafe-eval'' directives should be avoided where possible. If you must use them (many e-commerce platforms require them for analytics or chat), use nonces for inline scripts rather than blanket unsafe-inline.

Shopping cart sessions and authenticated customer accounts are valuable targets. A stolen session cookie gives an attacker full access to a customer''s account, including saved payment methods, address book, and order history.

Required cookie attributes for session cookies:

http
Set-Cookie: session_id=abc123;
  Secure;
  HttpOnly;
  SameSite=Strict;
  Path=/;
  Max-Age=86400
  • `Secure` — cookie only sent over HTTPS. Without this, the cookie is transmitted in the clear on any HTTP request
  • `HttpOnly` — JavaScript cannot access the cookie. Blocks session token theft via XSS
  • `SameSite=Strict` — cookie not sent on cross-site requests, preventing CSRF attacks. For OAuth flows that require cross-site redirect, use SameSite=Lax
  • `Max-Age` — session timeout. A session cookie that never expires is a long-term risk if a device is compromised

Stripe Integration Security

Webhook signature verification:

js
// Always verify Stripe webhook signatures
import Stripe from ''stripe''
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY)

export async function POST(req) {
  const body = await req.text()
  const signature = req.headers.get(''stripe-signature'')

  let event
  try {
    event = stripe.webhooks.constructEvent(
      body,
      signature,
      process.env.STRIPE_WEBHOOK_SECRET
    )
  } catch (err) {
    return new Response(`Webhook Error: ${err.message}`, { status: 400 })
  }

  // Process event
  switch (event.type) {
    case ''payment_intent.succeeded'':
      // Handle successful payment
      break
  }

  return new Response(null, { status: 200 })
}

Never process payment events without verifying the webhook signature. An attacker who knows your webhook endpoint can send fraudulent payment success events without signature verification.

Client-side key exposure: - STRIPE_SECRET_KEY must only exist in server-side environment variables — never in the client bundle - NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY is safe to expose client-side — it''s designed for that - Audit your Next.js bundle to confirm STRIPE_SECRET_KEY is not present

Security Headers Specific to E-commerce

Beyond the standard security headers, e-commerce sites have specific requirements:

Permissions-Policy — restrict access to browser features you don''t use:

Permissions-Policy: payment=(self "https://js.stripe.com"),
                    geolocation=(),
                    camera=(),
                    microphone=()

The payment directive controls which origins can use the Payment Request API. Explicitly allowing only self and your payment processor prevents malicious scripts from intercepting payment flows.

Cross-Origin-Embedder-Policy and Cross-Origin-Opener-Policy — for pages embedding payment iframes:

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Resource-Policy: same-origin

Note: These headers can break third-party payment iframes. Test carefully — some payment processors require same-origin-allow-popups or cross-origin settings for their checkout flows.

Admin Panel Security

  • [ ] Admin panel not accessible from public internet (IP allowlist or VPN)
  • [ ] Separate admin credentials (not customer account credentials)
  • [ ] MFA required for all admin accounts
  • [ ] Admin activity logged
  • [ ] No "admin", "backend", "wp-admin" paths accessible from public internet

Rate Limiting on Critical Endpoints

/checkout — rate limit by IP and session
/api/payment — rate limit aggressively
/login — rate limit login attempts (5 per minute by IP)
/forgot-password — rate limit to prevent email bombing
/api/cart — rate limit to prevent inventory manipulation

ZeriFlow — Continuous Security Monitoring

ZeriFlow is the most relevant tool for ongoing e-commerce site security because it monitors your live site against the exact categories that affect PCI DSS compliance: headers, SSL, cookies, mixed content, and information disclosure.

The monitoring feature is particularly valuable for e-commerce: every deployment creates risk. A new checkout plugin, a theme update, or a CDN configuration change can silently remove a security header. ZeriFlow sends an alert when your security score drops, catching regressions before they become compliance issues.

The white-label PDF report is useful for documenting your security posture for payment processor reviews or enterprise partner security questionnaires.

Use ZeriFlow for: Continuous monitoring, pre-launch checks, compliance documentation, deployment regression detection.

Snyk — Dependency Security

E-commerce platforms often run dozens of plugins and packages. A vulnerable version of a checkout plugin, a payment gateway library, or a UI component can expose your entire store. Snyk monitors your dependency tree and opens pull requests for security updates.

Cloudflare — WAF and DDoS Protection

Cloudflare''s Web Application Firewall (WAF) blocks common attack patterns — SQL injection, XSS, credential stuffing — before they reach your application. The free tier includes basic protection; the Pro tier ($20/mo) adds OWASP rulesets and bot management.

For e-commerce sites, Cloudflare Bot Management can significantly reduce card testing attacks and credential stuffing, which are disproportionately common against checkout and login endpoints.

SSL Labs — SSL/TLS Deep Analysis

Run SSL Labs on your domain quarterly to verify TLS configuration. It''s free and provides the most detailed TLS analysis available. Target an A+ grade.


The Ongoing Security Routine

Security is not a one-time checkbox. E-commerce site security degrades over time through deployments, plugin updates, configuration changes, and evolving attack patterns.

Weekly: - Review ZeriFlow monitoring alerts - Check Snyk/Dependabot for new vulnerability advisories

Monthly: - Run a full ZeriFlow scan and compare score to previous month - Review error logs for unusual patterns (excessive 401s, scanning behavior) - Verify SSL certificate expiry timeline

Quarterly: - Run SSL Labs TLS analysis - Review third-party scripts running on payment pages - Rotate credentials and API keys that are overdue for rotation - Review admin account access (remove former employees)

Annually: - Full security review against PCI DSS SAQ applicable to your implementation - Dependency audit for outdated packages beyond CVEs (older versions may lack security features even without known CVEs)

Start with a ZeriFlow free scan at zeriflow.com/free-scan to see where your store stands on the fundamentals. The results will show you which items on this checklist need immediate attention.

Ready to check your site?

Run a free security scan in 30 seconds.