What Should an E‑Commerce Pentest Cover?
An e-commerce pentest should cover the checkout and payment flow, customer accounts and login, the APIs behind the store, the client-side code you control, and the infrastructure around them. It should also test business logic, such as price manipulation and cart tampering, which scanners miss. Scope it to every place where money, credentials or customer data move.
TL;DR
- Cover every place money, credentials or customer data move: checkout and payments, accounts and login, the APIs behind the store, the client-side code you control, and the infrastructure around them.
- Checkout gets the deepest testing. A flaw there turns straight into lost revenue.
- Business logic is the core of it. Price manipulation, cart tampering and workflow bypass have no CVE, so scanners and DAST miss them.
- Test on a rhythm, not once. PCI DSS 4.0.1 requirement 11.4.3 asks for external penetration testing at least every 12 months and after any significant change.
Definition
What is an e-commerce pentest?
An e-commerce pentest is an authorized, simulated attack on an online store. Testers try to exploit weaknesses in the checkout, customer accounts, APIs, client-side code and infrastructure, and to chain them together, so you find the open doors before an attacker does. Unlike a scan, it also tests business logic, such as price manipulation and workflow bypass.
Here is the coverage at a glance:
| Area | What gets tested |
|---|---|
| Checkout and payments | Price manipulation and cart tampering, Workflow bypass, Race conditions, Guest checkout and order lookup |
| Accounts and authentication | Credential stuffing and rate limits, Login, MFA and one-time passcodes, Session handling, Account takeover paths, Customer-to-customer access |
| APIs | Object-level access, Function-level access, Rate limits and enumeration, Server-side request forgery |
| Injection and client-side code | Injection, Cross-site scripting, Data held in the browser |
| Infrastructure and configuration | Admin panels and default credentials, Security headers and CORS, Transport security |
| Data exposure | Error messages and debug output, API response leakage, Accessible backups |
Checkout and payments
Checkout is where a flaw turns straight into lost revenue, so it gets the deepest testing. Business-logic flaws like these have no CVE, so scanners and DAST miss them. Test these four areas:
- Price manipulation and cart tampering: changes price, quantity or totals in the request. Finds checkouts that trust values sent by the browser.
- Workflow bypass: skips, repeats or reorders checkout steps. Finds orders that complete without a payment step.
- Race conditions: sends parallel requests for the last item or a single-use action. Finds oversold stock and actions applied twice.
- Guest checkout and order lookup: tests order-status links and guest sessions. Finds orders or addresses that open by changing an identifier.
Accounts and authentication
Customer accounts hold saved payment details, addresses and order history, so they are a target on their own. Test these five areas:
- Credential stuffing and rate limits: replays leaked login pairs at speed. Finds logins with no throttling or lockout.
- Login, MFA and one-time passcodes: tests every step of the sign-in flow. Finds authentication bypass and weak session validation.
- Session handling: checks token handling, logout and session fixation. Finds sessions that survive logout or can be hijacked.
- Account takeover paths: works through password reset and account-detail changes. Finds ways to take over an account without knowing the password.
- Customer-to-customer access: swaps IDs for profiles, orders and addresses. Finds horizontal and vertical privilege escalation, where one customer sees another’s data or gains staff rights.
APIs
Most of what a storefront does runs through APIs: carts, orders, accounts and search. The OWASP API Security Top 10 (2023) is a good map for what to test. Cover these four areas:
- Object-level access: swaps order, address and invoice IDs in API calls. Finds one customer reading or changing another customer’s data.
- Function-level access: calls staff and admin functions as an ordinary customer. Finds privileged actions that are hidden from the interface but open to the API.
- Rate limits and enumeration: sends repeated requests to list or guess records. Finds endpoints that allow bulk extraction.
- Server-side request forgery: feeds internal addresses into features that fetch a URL. Finds ways to reach internal systems or cloud metadata.
Injection and client-side code
Some of the highest-impact flaws sit in the code you control, on the server and in the browser. Test these three areas:
- Injection: tries SQL, command, NoSQL and template injection across every input. Finds inputs that let an attacker run queries or commands.
- Cross-site scripting: tests reflected, stored and DOM-based scripting, including in logged-in flows. Finds pages where an attacker can run code in a customer’s browser.
- Data held in the browser: looks for secrets, API keys and personal data in local storage. Finds anything a script on the page could read.
Scope note: Third-party scripts are a separate question. A pentest tests the code you control, while script monitoring watches the code you don’t, such as vendor tags that change or start reading data. Reflectiz covers that layer with Security Hub, and the payment-page script requirements in PCI DSS (6.4.3 and 11.6.1) with the PCI Module.
Infrastructure and configuration
The store sits on a platform, hosting and admin tools that change often. Test these three areas:
- Admin panels and default credentials: looks for exposed admin pages and unchanged logins. Finds the highest-value door in the store.
- Security headers and CORS: reviews response headers and cross-origin settings. Finds missing protections and settings that expose data to untrusted sites.
- Transport security: checks HTTPS, TLS strength and HSTS. Finds data sent over HTTP or protected by weak or outdated TLS.
Data exposure
A store can be well defended and still leak customer data through ordinary pages. Test these three areas:
- Error messages and debug output: triggers failures on purpose. Finds stack traces, internal paths and configuration details in error pages.
- API response leakage: compares what API responses send back with what the page shows. Finds personal data in responses that the page never displays.
- Accessible backups: looks for backup files and archives left on the web server. Finds copies of code or data open to anyone.
Why one yearly test is not enough
A once-a-year test is a photograph of a store that changes every week. For most merchants, PCI DSS pen testing is required once a year and after any significant change, as SC Media summarizes. But a promotion, a new payment method, a plugin update or a new tag can reopen any flaw in the list above long before the next test.
Continuous testing with full coverage answers that:
- Testing keeps pace with releases: the areas above are tested again as the store changes, weekly, monthly or on every release, not once a year.
- Coverage you can verify: every run produces a coverage matrix of endpoints, attack types, payloads and results, so you can see what was covered and what wasn’t.
- Interactive journeys included: logins with one-time passcodes and 2FA, multi-step forms and checkout are where business-logic flaws live, and they are part of the scope.
For the security leader’s view of how to adopt agentic pentesting safely, including a 90-day roadmap, read the CISO’s Expert Guide to Agentic Pentesting.
Reflectiz offers a 30-day free agentic pentesting trial for e-commerce sites, with no code to install. Start the 30-day free trial.
Sources
- OWASP API Security Project: the API Security Top 10 (2023) behind the API tests.
- SC Media, “What PCI DSS 4.0 means for pen testers”: PCI DSS pen-testing frequency, requirements 11.4.1 and 11.4.4, and the payment-page script requirements 6.4.3 and 11.6.1.
- Reflectiz Offensive Hub: what the agent tests, the coverage matrix, scheduling and scope controls.
- Website Pentesting for E-Commerce: The Complete Guide: flow priorities, PCI DSS 11.4.3, and the split between pentesting and script monitoring.
FAQs
Does PCI DSS require penetration testing?
Yes. PCI DSS 4.0.1 requirement 11.4.3 asks for external penetration testing at least every 12 months and after any significant change. Requirement 11.4 also calls for a defined methodology and for fixing and retesting what is found (SC Media). Check the exact wording in the current standard from the PCI Security Standards Council and with your assessor.
How often should an e-commerce site be pentested?
At least once a year, and after any significant change to the store. In practice that means after a new payment method, a platform or plugin upgrade, a major promotion, or a new integration. Stores that release weekly gain from testing on that rhythm.
Should we test production or staging?
Staging is safer but may differ from production in configuration and integrations. Production testing is realistic, so scope it carefully and limit active hours to off-peak windows. Many teams run against staging or pre-production before a release and against production on a schedule.
What is the difference between a pentest and a vulnerability scan?
A scan looks for known weaknesses automatically. A pentest tries to exploit them and chain them together, and it covers business logic, such as price manipulation and workflow bypass, which scans do not understand.
What should we prepare before a test?
A URL for each application in scope and, for logged-in areas, test credentials for the roles you want covered. Decide which flows and endpoints are in scope, what to exclude, which steps need admin approval, and when testing may run.
Subscribe to our newsletter
Stay updated with the latest news, articles, and insights from Reflectiz.
AI Has Changed The Web.
Are You Ready for What’s Next?
Third-party code shifts by the hour. Supply-chain compromises strike without warning. AI-driven web attacks now evolve faster than traditional security can ever keep up.
Reflectiz delivers the continuous, real-time visibility needed to expose the risks traditional tools miss entirely.
Zero code changes. Zero access to your data. Ultimate peace of mind.