All services / Security / Page Shield
πŸ“œ
Security

Page Shield

See and control every script running in your customers' browsers to stop MagecartMagecartA style of attack that injects card-skimming JavaScript into checkout pages to steal payment details.-style skimming that server-side security can't catch.

What it is

Page Shield monitors the JavaScript and third-party scripts running in your users' browsers to catch client-side and supply-chain attacks like MagecartMagecartA style of attack that injects card-skimming JavaScript into checkout pages to steal payment details. digital skimming. It alerts you when new or modified scripts appear and helps you enforce a Content Security PolicyCSPContent Security Policy β€” a browser rule set that controls which scripts and resources a page is allowed to load..

Why it helps the client

  • Detects malicious or unexpected third-party scripts stealing card and PII data (Magecart).
  • Maintains a continuous inventory of every script and the connections it makes.
  • Helps meet PCI DSS 4.0 client-side security requirements.
  • Alerts on new or changed scripts so supply-chain compromises are caught fast.

Why they'd want it

  • Client-side attacks bypass server-side WAFs β€” this is the missing piece.
  • A concrete path to PCI DSS 4.0 compliance for payment pages.
  • Protect customer trust: skimming attacks are silent and brand-damaging.

πŸ”¬ How it actually works

  • Page Shield is client-side security: it reports the scripts and network connections running in your users' browsers β€” via the browser's Content-Security-Policy reporting plus Cloudflare's analysis β€” and builds a live inventory of first- and third-party scripts.
  • It flags new, changed, or malicious scripts and connections β€” the signature of MagecartMagecartA style of attack that injects card-skimming JavaScript into checkout pages to steal payment details. / formjacking supply-chain attacks that server-side tools literally cannot see, because the malicious code runs in the browser and exfiltrates straight to the attacker.
  • It helps you build and enforce a Content Security PolicyCSPContent Security Policy β€” a browser rule set that controls which scripts and resources a page is allowed to load., and delivers the client-side script monitoring that PCI DSS 4.0PCI DSSPayment Card Industry Data Security Standard β€” the security rules everyone handling credit-card data must follow. (requirements 6.4.3 and 11.6.1) now mandates for payment pages.
  • Alerts fire when a new script appears or a known script starts talking to a new domain, so a supply-chain compromise is caught quickly rather than months later.

πŸ“– Key terms on this page hover any underlined term anywhere on the site for its definition

Magecart
A style of attack that injects card-skimming JavaScript into checkout pages to steal payment details.
CSP
Content Security Policy β€” a browser rule set that controls which scripts and resources a page is allowed to load.
PCI DSS
Payment Card Industry Data Security Standard β€” the security rules everyone handling credit-card data must follow.
WAF
Web Application Firewall β€” inspects web requests and blocks malicious ones (like SQL injection and XSS) before they reach your site.
CDN
Content Delivery Network β€” a worldwide set of servers that keep copies of your content close to users so pages load faster.
origin
Your own web server or host where your website actually lives. Cloudflare sits in front of it.

Live demo walkthrough

5 steps

Screens below are annotated recreations of the Cloudflare dashboard. The numbered orange pin marks exactly where to click.

1

Select the website

πŸ‘† Account Home β†’ example.com
πŸ”’dash.cloudflare.com
example.com β–Ύ
Test Account NickN

πŸ‘‰ Do this

Open the site β€” ideally one with a checkout or payment page.

πŸ’¬ Say this

β€œThis one matters most for anyone taking payments online. Let's look at what runs in the customer's browser.”

2

Open Security β†’ Page Shield

πŸ‘† Left nav β†’ Security β†’ Page Shield
πŸ”’dash.cloudflare.com/example.com/security/page-shield
example.com β–Ύ
Test Account NickN

Security

Page Shield

Page ShieldMonitor the third-party scripts running on your pages for Magecart-style supply-chain attacks.
Scripts detected 24 active
ScriptHostFirst seenStatus
checkout.jsjs.stripe.com32 days agoAllowed
analytics.jsgoogletagmanager.com60 days agoAllowed
promo-widget.jscdn.unknown-3p.io2 hours agoNew
Content Security PolicyAlert on or block scripts and connections that fall outside an allowed list β€” and get notified the moment a new one appears.

πŸ‘‰ Do this

Expand Security and click Page Shield.

πŸ’¬ Say this

β€œEverything so far protects the server side. Page Shield protects the client side β€” the code executing in your users' browsers, which a traditional WAF can't see.”

3

Enable monitoring

πŸ‘† Page Shield β†’ Enable toggle
πŸ”’dash.cloudflare.com/example.com/security/page-shield
example.com β–Ύ
Test Account NickN

Security

Page Shield

Page ShieldMonitor the third-party scripts running on your pages for Magecart-style supply-chain attacks.
3
Scripts detected 24 active
ScriptHostFirst seenStatus
checkout.jsjs.stripe.com32 days agoAllowed
analytics.jsgoogletagmanager.com60 days agoAllowed
promo-widget.jscdn.unknown-3p.io2 hours agoNew
Content Security PolicyAlert on or block scripts and connections that fall outside an allowed list β€” and get notified the moment a new one appears.

πŸ‘‰ Do this

Toggle Page Shield on.

πŸ’¬ Say this

β€œOne switch turns on monitoring. Cloudflare then inventories every script your pages load and every connection those scripts make.”

4

Inspect detected scripts

πŸ‘† Page Shield β†’ Scripts
πŸ”’dash.cloudflare.com/example.com/security/page-shield
example.com β–Ύ
Test Account NickN

Security

Page Shield

Page ShieldMonitor the third-party scripts running on your pages for Magecart-style supply-chain attacks.
Scripts detected 24 active
ScriptHostFirst seenStatus
checkout.jsjs.stripe.com32 days agoAllowed
analytics.jsgoogletagmanager.com60 days agoAllowed
promo-widget.jscdn.unknown-3p.io2 hours agoNew
4
Content Security PolicyAlert on or block scripts and connections that fall outside an allowed list β€” and get notified the moment a new one appears.

πŸ‘‰ Do this

Review the script inventory and flag the newly-seen third-party script.

πŸ’¬ Say this

β€œHere's every third-party script, where it's hosted, and when it first appeared. That 'promo-widget.js' from an unknown CDN, first seen two hours ago, is exactly the kind of supply-chain change Page Shield flags β€” before it skims a single card number. This is also how customers satisfy PCI DSS 4.0.”

5

Set a policy & get alerted

πŸ‘† Page Shield β†’ Policies
πŸ”’dash.cloudflare.com/example.com/security/page-shield
example.com β–Ύ
Test Account NickN

Security

Page Shield

Page ShieldMonitor the third-party scripts running on your pages for Magecart-style supply-chain attacks.
Scripts detected 24 active
ScriptHostFirst seenStatus
checkout.jsjs.stripe.com32 days agoAllowed
analytics.jsgoogletagmanager.com60 days agoAllowed
promo-widget.jscdn.unknown-3p.io2 hours agoNew
Content Security PolicyAlert on or block scripts and connections that fall outside an allowed list β€” and get notified the moment a new one appears.
5

πŸ‘‰ Do this

Show configuring a policy/alert so new or disallowed scripts trigger a notification.

πŸ’¬ Say this

β€œFinally we set a policy: alert us β€” or block outright β€” the moment a script or connection appears that isn't on our allow-list. So the next supply-chain compromise pages the security team in real time instead of surfacing in a breach report months later.”

Questions clients ask

Tap a question to reveal the answer to say
Why can't our WAF catch this already?β€Ί
The WAFWAFWeb Application Firewall β€” inspects web requests and blocks malicious ones (like SQL injection and XSS) before they reach your site. sees requests to your server. MagecartMagecartA style of attack that injects card-skimming JavaScript into checkout pages to steal payment details.-style skimmers run in the *customer's browser* and send card data directly to the attacker β€” that traffic never touches your originoriginYour own web server or host where your website actually lives. Cloudflare sits in front of it., so only client-side monitoring like Page Shield can see it.
Is this really a common threat?β€Ί
Yes β€” British Airways, Ticketmaster, and Newegg were all MagecartMagecartA style of attack that injects card-skimming JavaScript into checkout pages to steal payment details. victims. Any site loading third-party JS on payment or login pages is exposed, often through a compromised vendor script.
How does it help with PCI DSS 4.0?β€Ί
PCI DSS 4.0PCI DSSPayment Card Industry Data Security Standard β€” the security rules everyone handling credit-card data must follow. (6.4.3 and 11.6.1) requires inventorying and monitoring scripts on payment pages and detecting tampering β€” exactly what Page Shield automates.
Will turning it on break our site?β€Ί
Monitoring is passive and safe β€” it observes and alerts. Enforcement via CSPCSPContent Security Policy β€” a browser rule set that controls which scripts and resources a page is allowed to load. is opt-in and rolled out gradually, so you don't break legitimate scripts.
What do we do when it flags a script?β€Ί
Check the script's host and first-seen time; if it's unexpected β€” a new third-party domain appearing on checkout β€” you investigate the vendor and can block it with a CSPCSPContent Security Policy β€” a browser rule set that controls which scripts and resources a page is allowed to load. directive.