DEV Community

Serguey Shinder
Serguey Shinder

Posted on

Twenty Nine Scripts Ran on Our Checkout Page and My Team Had Approved Six of Them

Our trade website takes card payments, and its checkout page collects the card details itself before passing them to our payment provider. At the end of March 2025, two requirements in version 4.0 of the card industry's standard, PCI DSS, stopped being optional. One says we must keep an inventory of every script that runs on a payment page, with a reason for each and a record of who authorised it. The other says we must detect unauthorised changes to the page, checking at least weekly.

Both exist because of web skimming. In 2018 attackers altered one script on British Airways' website so that it copied card details as customers typed them and sent them to a server the attackers controlled. More than four hundred thousand customers and staff were affected, and the Information Commissioner fined the airline twenty million pounds.

When we built our inventory, the checkout loaded twenty nine scripts. My team could account for six: our own code and the payment provider's library. The other twenty three had arrived through the tag manager our marketing team uses for analytics and advertising: conversion pixels for four advertising networks, a live chat widget, a reviews badge, and a session recording tool that replays what visitors do to show where they give up. Its settings masked password fields. They did not mask the card number.

Nobody had done anything dishonest. Marketing had been given a tool built for adding scripts to web pages and had used it for exactly that. But anyone with a login to that tool could change our payment page, and so could anyone who took over one of those logins, or compromised one of the twenty three suppliers whose code we were loading, without a change request, a review or a line in our records.

The fixes took a month. The tag manager no longer loads on the checkout at all, and marketing now gets its conversion figures from our own server after payment. The checkout tells browsers which sources it may load scripts from and refuses everything else, and a nightly job compares the live page with its approved version. The recordings were deleted, and the supplier confirmed that in writing.

A tool that can change your website is a deployment tool, whoever holds the login. Find out who holds one for your payment page.

– Serguey Shinder

Top comments (1)

Collapse
 
fintechrailsdigest profile image
Fintech Rails Digest •

the six-of-twenty-nine number is the useful part: a script inventory is not a compliance document, it is an argument. walking into a review with a reason and a named authoriser for each of twenty-nine entries is a very different conversation from walking in with a bare list. the weekly change check is where most teams actually fail, because the payment page is the one page marketing keeps touching. a tool that can change the site is a deployment tool, whoever holds the login: that belongs in the on-call handbook.