Why Checkout Is the Highest-Risk Page on Your Site
Every page on your ecommerce site carries some security risk, but the checkout page is categorically different. It is the single point where payment card data, personal details, and delivery addresses converge. For attackers, it is the most valuable target on your entire domain.
The threat is not theoretical. Magecart attacks — where attackers inject malicious JavaScript into checkout pages to silently skim card details as customers type them — have affected thousands of UK online stores. Victims range from small Shopify merchants to large retailers. British Airways paid a £20 million ICO fine after a Magecart-style attack compromised the payment details of 400,000 customers. The attack ran for over two months before detection.
Understanding what makes a checkout page secure — and what makes it vulnerable — is the starting point for any UK ecommerce operator.
PCI DSS: The Baseline Standard
The Payment Card Industry Data Security Standard (PCI DSS) sets the security requirements for any business that accepts, processes, stores, or transmits payment card data. It is not optional — it is a contractual requirement imposed by Visa, Mastercard, and other card schemes through your payment processor.
For most UK small and medium ecommerce businesses, the relevant compliance path is SAQ A (Self-Assessment Questionnaire A), which applies when you fully outsource card processing to a compliant third party (like Stripe, Braintree, or Worldpay) and never handle raw card data yourself. Under SAQ A, your primary obligation is to ensure your checkout page is served over HTTPS, that you do not load scripts from untrusted sources, and that your hosted payment form has not been tampered with.
Larger businesses, or those that process card data server-side, face more stringent requirements under SAQ D or a full QSA audit. The PCI Security Standards Council publishes the full requirements at pcisecuritystandards.org.
Magecart and Supply Chain Attacks
The most significant threat to ecommerce checkouts in recent years is not a direct breach of your servers — it is the compromise of a third-party JavaScript library your checkout page loads. Magecart attackers target analytics scripts, A/B testing tools, live chat widgets, and any other third-party code that runs on your checkout page. When they compromise the supplier, their malicious code runs on every store that loads that script.
Mitigations include:
**Subresource Integrity (SRI).** When loading external scripts, include an integrity attribute with a cryptographic hash of the expected file. If the file has been tampered with, the browser refuses to execute it. SRI is supported by all modern browsers and takes minutes to implement.
**Content Security Policy (CSP).** A strict CSP header prevents your checkout page from loading scripts from unauthorised sources. A well-configured CSP is one of the most effective defences against Magecart injection.
**Regular script auditing.** Review which third-party scripts load on your checkout page. Remove anything that is not essential. Each third-party script is a potential supply chain attack vector.
HTTPS and Certificate Management
All checkout pages must be served over HTTPS — this is a basic requirement, mandated by PCI DSS, expected by browsers (Chrome marks HTTP sites as "Not Secure"), and required by UK GDPR for transmitting personal data. Most ecommerce platforms handle this automatically, but it is worth verifying:
- Your SSL certificate is valid and not expired - Your site does not load mixed content (HTTPS page loading HTTP resources) - HSTS (HTTP Strict Transport Security) is enabled to prevent protocol downgrade attacks - Your certificate covers all relevant subdomains
Certificate expiry is a common cause of checkout outages and security warnings. Set a calendar reminder to renew certificates at least 30 days before expiry, or use Let's Encrypt with automatic renewal.
Authentication and Account Security at Checkout
Guest checkout reduces friction but also means customers cannot track orders or manage returns through an account. When you do offer accounts, checkout authentication needs particular attention:
- Account creation and login at checkout should enforce strong passwords and offer 2FA - Password reset flows at checkout are a common attack vector — ensure reset tokens expire quickly and are single-use - Limit failed login attempts to prevent brute force attacks against customer accounts - Do not expose customer email addresses in page source or API responses
For returning customers, ensure their saved addresses and payment methods are only accessible after re-authentication — not just a valid session cookie.
ICO and UK GDPR at Checkout
Your checkout page collects personal data — names, addresses, email addresses, and payment details. Under UK GDPR, you must:
- Have a lawful basis for collecting each data element (typically contract performance for the order, legitimate interest for fraud prevention) - Present a clear privacy notice explaining how data will be used - Not collect more data than necessary for the transaction - Implement appropriate technical security measures
The ICO has taken enforcement action against ecommerce businesses following data breaches at checkout. The common thread in enforcement cases is not just that a breach occurred, but that the business failed to implement basic security measures that would have prevented it.
Testing Your Checkout Security
A penetration test of your ecommerce checkout should cover:
- Injection vulnerabilities in checkout form fields - Authentication bypass on account-based checkout - Insecure direct object references (can a customer access another customer's order?) - Third-party script inventory and CSP configuration - HTTPS configuration and certificate validity - Payment flow tampering (can order totals be manipulated client-side?)
Yrzo AI's automated scanner covers the web-facing attack surface of your checkout, including common injection vulnerabilities and configuration weaknesses, in under 20 minutes. For high-volume UK ecommerce stores, running a scan after every significant site update is a practical way to catch regressions before attackers do.
Find out if your website has these vulnerabilities
Yrzo AI runs 110+ automated security checks and delivers a full report in under 20 minutes. Starting from £149.
Scan your website →