Content Security Policy (CSP) is a web browser security standard that lets a website declare which sources of scripts, styles, frames and other resources a page may load or connect to. The site sends the policy in an HTTP response header, and the browser blocks anything not on the list. Developed under the World Wide Web Consortium (W3C), it is a main defence against cross-site scripting and against the injected code behind online card skimming, in which malware on a checkout page copies card details as they are typed.
Payment pages use CSP to help meet PCI DSS 4.0, whose requirement 6.4.3 calls for managing and authorizing every script on a payment page and requirement 11.6.1 for detecting unauthorized changes to it; both became mandatory on 31 March 2025. A policy can first run in report-only mode. It complements, rather than replaces, hosted payment pages, review of third-party JavaScript and HTTPS.