Sovra Recon·Sector · E-commerce

E-commerce Penetration Testing: Securing an E-commerce Site and its Payment Gateway

By Solan Barlet, co-founder of Sovra Recon
Updated October 29, 2026

In short

An e-commerce penetration test simulates an attack on a merchant site just as a fraudster would: altering a price or shopping cart, stacking promo codes, taking control of customer accounts, or injecting a script into the payment page. For merchants subject to PCI DSS, requirement 11.4 of version 4.0.1 mandates internal and external penetration tests at least every 12 months and after any significant change. Online payments remain the most targeted channel: according to the Banque de France, they will account for 70% of fraud involving cards issued in France by 2025, representing 27% of the total amounts paid.

What PCI DSS Requires: Requirement 11.4

PCI DSS (Payment Card Industry Data Security Standard) is the security standard mandated by card networks for any organization that stores, processes, or transmits card data. Version 4.0.1, published in June 2024, is the only active version since the withdrawal of v4.0 on December 31, 2024. Requirement 11.4 stipulates that external and internal penetration tests must be conducted regularly, and that any exploitable vulnerabilities and security weaknesses found must be corrected.

RequirementContents
11.4.1Defined and documented methodology: industry-recognized approaches, coverage of the entire scope of the card data environment (CDE) and critical systems, tests conducted from both inside and outside the network, application tests covering at least the attacks listed in Requirement 6.2.4, and retention of results for at least 12 months
11.4.2 and 11.4.3Internal and external penetration tests must be conducted at least every 12 months and after any significant changes to the infrastructure or application, by a qualified internal resource or a qualified, organizationally independent third party (not necessarily a QSA or ASV)
11.4.4Vulnerabilities are patched based on their severity, followed by retesting to verify the fixes
11.4.5If a segmentation isolates the CDE: test this segmentation at least every 12 months and after any modification
11.4.6 and 11.4.7Service providers: segmentation testing every 6 months; multi-client service providers: required to assist their clients in conducting their external tests

Requirement 6.2.4, to which the methodology refers, includes attacks on business logic: bypassing application functions by manipulating APIs, protocols, or client-side code. A vulnerability scan does not satisfy Requirement 11.4: PCI DSS addresses scans separately, under Requirement 11.3.

Two requirements have directly applied to merchant websites since March 31, 2025: 6.4.3 (inventory, authorization, and integrity checks of payment page scripts) and 11.6.1 (detection of unauthorized modifications to the payment page as received by the browser). These requirements address web skimming attacks, known as “Magecart,” in which an injected script steals the card numbers entered by the user. For merchants who fully outsource payment processing (SAQ A questionnaire), the PCI SSC replaced these two requirements in 2025 with an eligibility criterion: confirming that their site is not vulnerable to these script-based attacks.

Vulnerabilities specific to an e-commerce site

  • Price and shopping cart: Modify the price, quantity (negative or decimal), or currency in the request sent to the server. The total must always be recalculated on the server side.
  • Promo codes and loyalty programs: combining codes that cannot be combined, reusing a single-use code, easily guessable codes, referral abuse involving fake accounts, and points credited twice due to simultaneous requests (“race condition”).
  • Checkout funnel: skip the payment step, replay the successful payment notification sent by the service provider (webhook), and approve an order for which payment failed.
  • Customer accounts: takeover via credential stuffing, bypassable password reset, and access to another customer’s orders, addresses, and invoices (IDOR).
  • Inventory and Reservations: Block an entire inventory or delivery slots without ever paying.
  • Back office: exposed administration interfaces, shared accounts without multi-factor authentication, and overly broad access rights for employees, branches, and service providers.
  • Third-party scripts: Every marketing tag, widget, or extension loaded on the payment page can become a vector for skimming.

These vulnerabilities cannot be detected with a scanner: one must understand the purchase journey and seek to circumvent it, with the customer’s account in hand.

Online Fraud: What the Numbers Say

Card fraud is declining in France, but it remains concentrated in online sales. The 2025 report from the Payment Security Observatory (Bank of France, September 2026) indicates, for cards issued in France:

  • Total fraud amount: 475 million euros in 2025, down 8.6% from 2024.
  • Online payments: 70% of the value of fraud, accounting for only 27% of the total transaction amount.
  • Internet payment fraud rate: 0.124% in 2025, compared to 0.155% in 2024—a decline that the Observatory attributes to its action plan and the efforts of the entire payments ecosystem.

Strong cardholder authentication (3-D Secure, mandated by the European Payment Services Directive PSD2) protects the payment transaction itself. It does not protect the rest of the website: a stolen customer account, an order confirmed without payment, or a misused promo code are entirely outside its scope.

Magento, WooCommerce, Shopify: Who Is Responsible for What?

PlatformWhat the software vendor or hosting provider managesWhat remains for the merchant (and to be tested)
Adobe Commerce (Magento) on Adobe’s cloud infrastructureThe platform’s core code and its penetration tests, infrastructure, and PCI certification of the infrastructure and servicesCustom code, third-party extensions and integrations, rapid application of patches, and compliance of the merchant’s own processes. Adobe specifies that the PCI requirements for penetration tests are shared with the merchant.
Magento Open Source or self-hosted WooCommerceRelease of the software and its patches; the software itself is not PCI DSS-certifiedEverything else: hosting, server, CMS, extensions, theme, back office. WooCommerce reminds users that PCI DSS compliance is ultimately the merchant’s responsibility.
Shopify (SaaS)Infrastructure, hosting, and native payment tunnel, all covered by the platform’s PCI DSS certificationInstalled applications, added scripts and pixels, custom themes, custom developments, team accounts, integrations (ERP, logistics, marketplaces)

On a SaaS platform, the provider’s infrastructure cannot be tested without its consent: the scope is limited to what the merchant controls (their store, test accounts, applications, and integrations), in accordance with the platform’s terms and conditions. On a self-hosted solution, everything must be tested, from the server to the checkout process.

Preparing for a penetration test of an online store

  • Environment: a pre-production environment identical to the production environment, with the payment service provider in test mode (sandbox), to run through the entire process without actual transactions.
  • Accounts: multiple customer accounts, one account per back-office role, and test promo codes.
  • Scope: website, mobile apps, APIs, back office, integrations, and, for PCI DSS, the scope of the CDE agreed upon with your QSA or acquiring bank.
  • Schedule: Avoid peak sales periods (sales events, Black Friday), and retest after a redesign of the checkout process or a change in payment service provider.

Sovra Recon tests these payment flows using autonomous AI agents, either through one-time audits prior to going live (RAID) or continuously as your systems evolve (SENTINELLE).

Frequently asked questions

Does a merchant that uses a payment service provider need to conduct a PCI DSS penetration test?

This depends on the integration. If the payment is entirely redirected to the service provider, the merchant’s requirements are significantly reduced (SAQ A questionnaire), though they do not disappear entirely. If the merchant integrates the payment form or scripts themselves, their scope expands, and the penetration tests required by Requirement 11.4 generally apply. Your acquiring bank or QSA will specify the applicable level.

How often should an e-commerce site be tested?

PCI DSS requires at least one test every 12 months and after any significant change. A website that releases updates weekly should test more frequently—at a minimum, whenever the checkout process is redesigned or a new payment method is added.

Shopify is PCI DSS-certified: Is my store secure?

The certification covers Shopify’s infrastructure and native payment processing. It does not cover third-party apps you install, added scripts, your custom developments, or your team’s account management.

Is a scan of vulnerabilities sufficient for PCI DSS compliance?

No. Vulnerability scans (Requirement 11.3) and penetration tests (Requirement 11.4) are two separate requirements: a scan report does not replace a penetration test.

Sources

Find out where an attacker would get in.

Our AI agents actually attack your scope, fully automated, and hand you the proof of every vulnerability.