Back to Blog Homepage
    Deploy Blog
    Nathan Chick

    PCI DSS 4.0.1 and Magento: Your Checkout Page's JavaScript Is Now Your Responsibility

    There's no grace period left on PCI DSS 4.0.1. For the first time, every script running on your checkout page - not just your payment gateway - is explicitly in scope. Here's what that means for Magento.

    PCI DSS 4.0.1 and Magento: Your Checkout Page's JavaScript Is Now Your Responsibility

    PCI DSS 4.0.1 is now the only version of the standard in force, and every future-dated requirement in it has been mandatory since 31 March 2025: there's no grace period left to lean on. The part most Magento merchants still haven't fully addressed is client-side script security: for the first time, the standard explicitly makes you responsible for every script that runs in a shopper's browser on your checkout page, not just the payment gateway itself. That's aimed squarely at e-skimming (also known as Magecart) attacks, and 2026 is the first full assessment cycle where assessors expect to see it actually working, not just switched on once and forgotten.

    We wrote generally about who's responsible for PCI compliance a few years back. This is the focused follow-up on the one part of 4.0.1 that's genuinely new and genuinely easy to get wrong.

    What changed since 3.2.1

    Older versions of PCI DSS cared mostly about where card data was stored and how it was transmitted. 4.0.1 adds two requirements that care about something different: what code is allowed to run on the page where a customer types their card number, and whether you'd notice if that code changed without your permission. That distinction matters because a huge share of real-world skimming attacks don't touch your server at all: they compromise a third-party script (a tag manager, an analytics snippet, a chat widget, an upsell app) that's already trusted to load on your checkout page, and use it to quietly copy card data as it's typed.

    Requirement 6.4.3: know every script on your payment page

    Requirement 6.4.3 requires that every script that loads on a payment page is authorised, has its integrity assured, and is inventoried with a written justification for why it's there. In practice that means a documented list: this script, added for this reason, approved by this person, with some mechanism confirming it's actually the script you expect and not something that's been quietly swapped out.

    On a Magento storefront, "payment page" in PCI's terms covers more than you might assume. If it loads on your checkout route, it's in scope: your tag manager, analytics (Google Analytics, Hotjar-style heatmap tools), live chat widgets, upsell/cross-sell apps, even a poorly-scoped third-party review widget. Every one of those needs a reason on file.

    Requirement 11.6.1: notice when something changes

    Requirement 11.6.1 requires a mechanism that detects unauthorised changes to the scripts and security-relevant HTTP headers on your payment page, and alerts you when it finds one (checked at least every seven days by default, unless you can justify a different frequency through a documented risk analysis). This is the part that catches an attack in progress rather than just documenting your intentions after the fact.

    What this looks like in Magento

    A few practical routes, roughly in order of effort:

    1. Use Magento's own CSP tooling. The platform's Content Security Policy and Subresource Integrity features (improved with the file-based collector shipped in the October 2025 patch releases) let you define an allowlist of approved script sources and enforce SRI hashes, so an unapproved or altered script simply won't execute.
    2. Add a third-party tamper-detection service if you want continuous monitoring with alerting baked in, rather than relying solely on CSP reports.
    3. At minimum, build the manual inventory. Walk through everything that loads on /checkout, write down what it is and why it's there, and review it on a fixed schedule. This is the baseline requirement even before you add any tooling on top.

    A checklist to start from

    • List every script that loads on your checkout page, including anything pulled in through a tag manager.
    • For each one, document who approved it and why it's needed.
    • Set up CSP and SRI so unapproved scripts can't silently execute.
    • Add a weekly (or risk-justified alternative) integrity check that alerts a real person if the list changes.
    • Treat any new app or script added to checkout as a change that needs the same review, not a one-off exception.

    It's worth reading this alongside what happened to a cluster of Shopify apps in October 2026: different platform, same underlying failure mode. A trusted third-party script, injected onto a page where customers enter card details, redirecting them somewhere it shouldn't. PCI DSS 4.0.1 exists precisely to make that kind of incident something you catch in days, not months.

    FAQ

    Does PCI DSS 4.0.1 apply to me if I use Adobe Commerce's hosted checkout? Hosted and tokenised checkout options reduce your scope considerably, but they don't remove it entirely if any of your own scripts still load on the checkout page itself. Check your SAQ type with your acquirer to be sure which requirements apply to your specific setup.

    What counts as a "payment page script" on a Magento storefront? Anything that executes on the page where card details are entered: your own code, a tag manager and everything it injects, chat widgets, analytics, upsell apps. If it loads on /checkout, it's in scope.

    What's the penalty for non-compliance in practice? Fines are issued through your acquirer and payment brands rather than a government body, and can run from a few thousand to six figures a month depending on scale and duration. See our earlier piece on who's actually responsible for PCI compliance for the detail. In the event of a breach, demonstrable compliance also materially affects how regulators and card networks treat you afterwards.

    Sources: SecurityMetrics' guide to the 4.0.1 requirements, Report URI's plain-English FAQ on SAQ A and client-side security, Compassmsp on 4.0.1's full enforcement.

    Last updated 1 April 2026.

    Need Help with Your eCommerce Project?

    Get expert advice from our Magento specialists and marketing professionals.