Glossary · E-commerce
Content Security Policy
- Area
- E-commerce
- Related
- Web skimming, Web application firewall, Storefront
A Content Security Policy (CSP) is a mechanism that developers can use to lock down their web applications in various ways and so reduce the risk of content injection.
A website usually delivers the policy in an HTTP response header. The mechanism is set out in the W3C specification Content Security Policy Level 3, a Working Draft of 27 October 2026 and not a finished Recommendation. The specification names cross-site scripting as an example of the content injection vulnerabilities it addresses. It presents CSP not as the first line of defence but as an additional layer that does not replace careful input validation Validation In the EU GMP and GDP glossaries, validation is the action of proving that any procedure, process, equipment, material, activity or system actually leads to the expected results. Read in the glossary → and output encoding.
Europol lists CSP among the protections against web skimming Web skimming Web skimming is the theft of payment card data at an online shop's checkout, in which injected malicious code passes the card details entered by a customer to criminals, unnoticed. Read in the glossary → , because it makes injecting malicious code into a shop harder. OWASP's CSP cheat sheet adds that a CSP can be used to enforce Subresource Integrity, which can help when a third party serving JavaScript files is compromised.
For organisations that follow IT-Grundschutz, the Compendium, Edition 2023 (in German), has a Standard Requirement on developing web applications under which, among other headers, the Content-Security-Policy header should be set. In its recommendation BSI-CS 120 (version 3.0, 2021, in German), the BSI advises keeping JavaScript in separate files and not using eval(). Only then, it says, can a CSP be set without the security-critical settings unsafe-inline and unsafe-eval.
The specification provides the Content-Security-Policy-Report-Only header for trying out a policy. The browser then reports violations without enforcing the policy, so its effect can be observed first.
See also
-
Web skimming
Web skimming is the theft of payment card data at an online shop's checkout, in which injected malicious code passes the card details entered by a customer to criminals, unnoticed.
E-commerce
-
Web application firewall
A web application firewall (WAF) is an application-level filter that checks the requests to a web application and the responses it sends, in order to fend off attacks carried in web traffic.
E-commerce
-
Storefront
The storefront is the part of an online shop that customers see and use, as distinct from the administration interface used by the operator.
E-commerce
Sources
-
Content Security Policy Level 3, W3C Working Draft, 27 October 2026 (opens in a new tab)
W3C Web Application Security Working Group accessed
-
Digital Skimming (Public awareness and prevention guide, deutsche Fassung) (opens in a new tab)
Europol (European Cybercrime Centre, EC3) accessed
-
Content Security Policy Cheat Sheet (opens in a new tab)
OWASP Foundation (OWASP Cheat Sheet Series) accessed
-
IT-Grundschutz-Kompendium Edition 2023 (Gesamt-PDF), Baustein CON.10 Entwicklung von Webanwendungen (opens in a new tab)
Bundesamt für Sicherheit in der Informationstechnik (BSI) accessed
-
BSI-CS 120: Sicherheitsmaßnahmen beim Einsatz aktiver Inhalte, Version 3.0 vom 01.02.2021 (opens in a new tab)
Bundesamt für Sicherheit in der Informationstechnik (BSI) accessed