Online services, e-commerce sites, videoconference, delivery services, and all other kinds of services are growing exponentially, exposing users and data to new risks and threats. Users expect that the sites and services they rely on are using best practices when it comes to security. But are they?
To better understand web application security posture, Bitsight researchers examined the usage of Content Security Policy (CSP) across the global Internet since 2017. CSP is a W3C recommended security standard that “defines a mechanism by which web developers can control the resources which a particular page can fetch or execute, as well as a number of security-relevant policy decisions.” The technology is about 10 years old, and had 3 versions over this time. All major Internet browsers implement CSP.
CSP is designed to prevent cross-site scripting (XSS), clickjacking, “Man in the Middle” attacks, and other code injection attacks. XSS has become a common attack vector for malicious actors to target web applications and their private data. The threat and dangers of XSS include stealing credentials, sessions, or delivering malware to the victim. In recent months, attackers operating under the “Magecart” group have utilized hacking techniques like to inject malicious code into websites to steal data. Organizations like British Airways who failed to implement basic steps to reduce risk from these attacks have faced significant fines for their failures.
With new risks in play, Bitsight researchers wanted to evaluate whether organizations are actually implementing CSP and how that has changed over time. In summary, Bitsight researchers found:
- The adoption of CSP has increased significantly since 2017
- There is broad, consistent adoption of CSP across all sectors
- Larger organizations are more likely to use CSP
- The rate of usage of CSP is highest with the Top 1000 most visited websites, although the rate of adoption even by these website is only 24.5%
- Even though CSP adoption has increased, only 2% of sites have implemented “perfect” CSP; the vast majority of CSP adoption is missing key data or involves unsafe adoption
- Bitsight customers adopt CSP at a higher rate than the global Internet
Bitsight is able to assess CSP implementation by continuously monitoring global web application security issues. We can assess over time, at Internet-wide scale, the implementation and evolution of adoption of technologies dedicated to offer better security to web applications -- including CSP.
About the Study
Bitsight researchers studied the evolution of CSP from 2017 until the end of May 2020. The study includes 9 billion successful HTTP responses observed, making an average of 7 million observations a day. Of these observations one third were obtained from web applications using TLS/SSL.
This study includes overall usage of CSP and how we see it across different dimensions.
- Overall presence ratio over time
- By industry sector
- By organization size
- By common subdomain
- If present on network devices as Routers, Media Servers, NAS, PBX, IP Phones or Cameras, SSL VPNs, Printers
- If belonging to the most famous and used websites
- Bitsight customers versus Rest of the World