Date:
19 May 2023
Author:
Salsa Digital Security Team

Defense in depth at the content layer

Content Delivery Networks (CDNs)External Link play a critical role in ensuring that websites and applications deliver high-quality user experiences by reducing latencyExternal Link , increasing site reliability and improving the overall performance of web applications. As organisations rely on CDNs to handle the distribution of their digital assets worldwide, ensuring the security of the CDN layer is crucial to protect user data and maintain trust in the online ecosystem.

This whitepaper aims to provide a comprehensive understanding of the security risks and challenges associated with the content layer delivered through a CDN, and to offer a set of best practices and recommendations for effectively protecting this layer. The focus will be on identifying and addressing vulnerabilities, optimising security configurations and managing the overall security posture within the CDN infrastructure.

This whitepaper is designed for security professionals, web developers, network administrators and decision-makers responsible for maintaining the security and performance of web applications that rely on CDNs. Both technical and non-technical readers will benefit from the actionable insights provided in this document.

Key concepts and terminology

In this whitepaper, we’ll cover essential concepts and terminologies related to content delivery security through a CDN, including edge serversExternal Link , cachingExternal Link , SSL/TLSExternal Link , DDoS mitigationExternal Link and access control mechanismsExternal Link . A clear understanding of these concepts will help readers effectively apply the best practices and recommendations provided in this document.

By implementing the strategies and recommendations outlined in this whitepaper, you’ll strengthen your organisation's content delivery security posture and minimise the risk of cyberthreatsExternal Link and data breachesExternal Link .

Security risks and challenges

CDNs are exposed to various security risks and challenges that, if left unaddressed, can compromise the integrity and availability of web applications. In this section, we discuss some of the most common security risks associated with CDNs.

There are 7 main security risks and challenges at the CDN layer:

  1. DDoS attacks
  2. Vulnerability or access exploitation
  3. SSL/TLS vulnerabilities
  4. Cache poisoning
  5. Domain hijacking
  6. Compliance challenges
  7. Third-party dependencies

1. DDoS attacks

Distributed Denial of Service (DDoS) attacksExternal Link target CDN infrastructure to overwhelm servers with malicious traffic, causing downtime and degrading the performance of web applications. These attacks can have significant consequences for businesses that rely on their online presence for revenue generation and customer satisfaction.

2. Vulnerability or access exploitation

Attackers can exploit vulnerabilities in CDN configurations or use stolen credentials to gain unauthorised access to sensitive data, resulting in data breaches that can lead to severe financial and reputational damages.

3. SSL/TLS vulnerabilities

SSL/TLS certificatesExternal Link help protect the confidentiality and integrity of data transmitted between users and the CDN. However, misconfigured or outdated SSL/TLS implementations can expose the system to security vulnerabilities, allowing attackers to intercept and manipulate data in transit.

4. Cache poisoning

Cache poisoningExternal Link occurs when an attacker manipulates the CDN's cache to serve malicious content to users. This can lead to malware distributionExternal Link , defacement of web pagesExternal Link , or the theft of sensitive informationExternal Link from users.

5. Domain hijacking

Domain hijackingExternal Link refers to the unauthorised takeover of a website's domain or subdomain, usually by exploiting weaknesses in the domain registration process, through social engineering or other technical loopholesExternal Link . Attackers can redirect traffic to malicious websites or use the hijacked domain for phishing campaignsExternal Link , tarnishing the reputation of the original site owner.

6. Compliance challenges

CDNs can complicate compliance with data protection regulationsExternal Link , such as the General Data Protection Regulation (GDPR)External Link , the California Consumer Privacy Act (CCPA)External Link or similar regional data privacy lawsExternal Link , as they distribute data across multiple servers and jurisdictions. Ensuring data privacy and security within a CDN infrastructure requires diligent monitoring, auditing and control mechanisms.

7. Third-party dependencies

CDNs often rely on third-party infrastructure and services, which introduces additional risk factors. Vulnerabilities in these dependencies can create potential attack vectors for cybercriminals, making it essential to regularly assess and monitor the security posture of third-party components.

By understanding these risks and challenges, organisations can take proactive steps to secure their CDN infrastructure and ensure the safe delivery of digital assets to users.

Top 10 best practices and recommendations

Below we’ve put together our top 10 best practices/recommendations for securing the CDN layer.

  1. Implement strong access controls
  2. Use secure SSL/TLS configurations
  3. Protect against DDoS attacks
  4. Harden CDN configurations
  5. Secure content delivery
  6. Monitor and log CDN activity
  7. Implement a Web Application Firewall (WAF)
  8. Use content caching wisely
  9. Establish a Content Security Policy (CSP)
  10. Maintain and update your CDN infrastructure

1. Implement strong access controls

Access controlsExternal Link define who or what can access CDN resources, ensuring that only authorised users or services can access, modify or delete sensitive information. Implementing strong access controls is critical to protecting your CDN infrastructure from unauthorised access.

Security benefits: Strong access controls help prevent data breaches, unauthorised access and other security incidents by restricting access to only those who have the appropriate permissions.

Actionable steps:

  1. Set up strong authentication, such as single sign-on (SSO)External Link or multifactor authentication (MFA)External Link .
  2. Apply the principle of least-privilegeExternal Link by granting users or services only the minimum permissions required to perform their tasks.
  3. Formulate a governance process to regularly review and update access policies and user account permissions.

2. Use secure SSL/TLS configurations

SSL/TLS configurationsExternal Link ensure the confidentiality and integrity of data transmitted between users and the CDN. Using secure SSL/TLS configurations helps protect against eavesdroppingExternal Link and person-in-the-middle attacksExternal Link .

Security benefits: Secure SSL/TLS configurations prevent attackers from intercepting or manipulating data in transit, protecting sensitive information from unauthorised access and ensuring data integrity.

Actionable steps:

  1. Ensure SSL/TLS certificates are up to date and from a reputable Certificate Authority (CA)External Link .
  2. Configure the CDN to use strong industry best practice based encryption algorithmsExternal Link and protocols.
  3. Regularly review and update SSL/TLS configurations to align with industry best practices.

3. Protect against DDoS attacks

DDoS attacks can overwhelm your CDN infrastructure and degrade the performance of your web applications. Protecting against DDoS attacks is critical to ensuring the availability of your services.

Security benefits: Implementing DDoS protection mechanisms helps maintain the availability and performance of your web applications, mitigating downtime and potential revenue loss.

Actionable steps:

  1. Use a CDN provider that offers built-in DDoS protectionExternal Link .
  2. Implement rate limitingExternal Link and traffic filtering to block malicious traffic.
  3. Monitor traffic patterns for signs of an attack and have a regularly tested incident response planExternal Link in place.

4. Harden CDN configurations

Hardening CDN configurations involves applying security best practices and removing any unnecessary services or settings that could expose the system to potential threats.

Security benefits: Hardened CDN configurations reduce the attack surface and minimise the risk of exploitation due to misconfigurations or outdated settings.

Actionable steps:

  1. Disable any unused or unnecessary CDN features and services.
  2. Regularly review and update CDN configurations to align with industry best practices and recommendations.
  3. Monitor for changes in configurations and investigate any unauthorised modifications.

5. Secure content delivery

Ensuring secure content delivery involves the use of encryption, access controls and content integrity checksExternal Link to protect digital assets as they are transmitted through the CDN.

Security benefits: Secure content delivery helps protect sensitive information from unauthorised access, tamperingExternal Link or theft, maintaining the integrity and privacy of user data.

Actionable steps:

  1. Use SSL/TLS encryption for content delivery.
  2. Implement strong access controls to restrict unauthorised access to content.
  3. Use content integrity checks, such as hashingExternal Link or digital signaturesExternal Link , to verify the authenticity of transmitted data.

6. Monitor and log CDN activity

Monitoring and logging CDN activity helps detect security incidents, identify potential vulnerabilities and provide an audit trail for forensic analysisExternal Link .

Security benefits: Regular monitoring and logging of CDN activity enable you to identify and respond to security incidents more effectively, helping to mitigate potential damages and downtime.

Actionable steps:

  1. Enable logging and monitoring features provided by your CDN.
  2. Implement a centralised correlation capability to detect potential events of interest.
  3. Configure log retentionExternal Link and storage settings to meet compliance and security requirements.
  4. Regularly review logs for unusual or suspicious activity and investigate potential security incidents.

7. Implement a Web Application Firewall (WAF)

A Web Application Firewall (WAF) is a security layer that filters and blocks malicious traffic targeting your web applications. WAFs can protect against various types of attacks, such as SQL injectionExternal Link , Cross-Site Scripting (XSS)External Link and remote file inclusionExternal Link . Using a WAF helps protect your CDN layer.

Security benefits: Implementing a WAF helps protect your web applications from known vulnerabilities and emerging threats, reducing the risk of data breaches and service disruptions.

Actionable steps:

  1. Choose a CDN provider that offers WAF integration or use a standalone WAF solution.
  2. Configure the WAF to block known attack vectors and filter suspicious traffic.
  3. Regularly update WAF rules to stay current with new threats and vulnerabilities.

8. Use content caching wisely

Content caching via your CDN can improve the performance of your web applications but may also introduce security risks if not managed properly. It's crucial to use caching wisely to avoid exposing sensitive information or outdated content to users.

Security benefits: Proper content caching strategies help ensure that users receive accurate and up-to-date information while minimising the risk of exposing sensitive data.

Actionable steps:

  1. Set cache control headersExternal Link and cache expirationExternal Link times to prevent serving stale or sensitive content.
  2. Use cache segmentationExternal Link to separate public and private content.
  3. Regularly review and update cache settings and policies to align with security best practices.

9. Establish a Content Security Policy (CSP)

A Content Security Policy (CSP)External Link is a security feature that helps prevent Cross-Site Scripting (XSS) and other code injection attacksExternal Link by specifying the sources of trusted content in your headersExternal Link .

Security benefits: Implementing a CSP can help protect your web applications from malicious code injections and other client-side attacks, improving the overall security posture of your website.

Actionable steps:

  1. Develop a comprehensive CSP that includes trusted sources for scripts, images, styles and other content types, and add to your website’s headers via the CDN or web application.
  2. Test the CSP to ensure it doesn't inadvertently block legitimate content.
  3. Monitor and update the CSP as necessary to address emerging threats or changes in your web applications.

10. Maintain and update your CDN infrastructure

Regularly maintaining and updating your CDN infrastructure ensures that your system is running optimally and protects against vulnerabilities that may be discovered in the software or hardware.

Security benefits: Maintaining and updating your CDN infrastructure helps reduce the risk of security incidents caused by outdated software, hardware or configurations.

Actionable steps:

  1. Regularly check for and apply updates to your CDN provider's software and services.
  2. Perform routine maintenance tasks, such as checking logs and optimising configurations.
  3. Monitor and address any performance or security issues that may arise in your CDN infrastructure.

Benefits and outcomes

Implementing a CDN and the security top 10 best practices and recommendations for content delivery, can lead to several benefits and positive outcomes for your organisation. These include:

  1. Improved website performance and user experience
  2. Enhanced security
  3. Scalability and flexibility
  4. Cost efficiency
  5. Global reach

1. Improved website performance and user experience

CDNs improve website performance by delivering content to users from edge serversExternal Link located closer to them, reducing latency and increasing loading speed.

Outcome: Faster loading times and improved user experience, leading to increased user engagement, conversions and retention.

2. Enhanced security

CDNs offer various security features, such as DDoS protection, SSL/TLS encryption and WAF integration, to help safeguard your web applications and data from malicious attacks.

Outcome: Reduced risk of security incidents, data breaches and downtime, contributing to a more secure and resilient online presence.

3. Scalability and flexibility

CDNs provide the ability to scale resources and handle sudden traffic spikes, ensuring your website remains available and performs well even during peak traffic periods.

Outcome: Enhanced ability to accommodate traffic fluctuations and maintain high-performance levels, ensuring a consistent user experience.

4. Cost efficiency

CDNs can help you save on bandwidth costs by caching and compressing content, reducing the amount of data that needs to be transmitted from your origin servers to users.

Outcome: Lower operational costs, freeing up resources to invest in other aspects of your business or online presence.

5. Global reach

CDNs enable your website and web applications to reach users across the globe with minimal latency, thanks to their distributed networks of edge servers.

Outcome: Enhanced ability to target international markets and provide a high-quality user experience to a global audience, expanding your potential customer base.

Conclusion

Content delivered via Content Delivery Networks (CDNs) plays a crucial role in enhancing the security, performance and user experience of modern web applications. A wide range of security risks and challenges associated with CDNs must be addressed to ensure optimal protection of your online assets. Implementing the top 10 best practices and recommendations for CDNs, as outlined in this whitepaper, can significantly improve the security and resilience of your web applications.

The effective use of CDNs in improving web application security is only one aspect of a comprehensive security strategy. It’s essential to consider all layers of web application security (infrastructure, hosting, application, WAF and CDN) and adopt a holistic approach to safeguard your online presence. The ever-evolving threat landscape requires organisations to continuously assess, refine and adapt their security measures.

By staying informed about new threats and emerging best practices, you can ensure that your CDN configuration remains current and effective in maintaining a secure and high-performing web environment.

National Institute of Standards and Technology (NIST) Cybersecurity Framework and the content delivery layer

NIST is a US-based agency that provides critical measurement solutions to promote equitable standards such as the NIST Cybersecurity FrameworkExternal Link (NIST CSF). NIST CSF is recognised globally as one of the leading standards for organisational cybersecurity management.

The NIST CSF can be applied to the content delivery layer to enhance the security of its networks, protect the content they deliver, and ensure the reliability of their services. Here are some of the NIST CSF activities that can apply to this layer:

Identify:

  1. Asset inventory: Identify all content delivery related assets, including servers, caching nodes and the content being delivered.

  2. Risk assessment: Evaluate the cybersecurity risks associated with content delivery operations, including potential vulnerabilities, threats and impacts on content availability and integrity.

Protect:

  1. Access controls: Implement access controls to limit access to content delivery resources and management interfaces to authorised personnel.

  2. Content security: Protect the integrity and authenticity of content by using techniques like content signing and monitoring for unauthorised alterations.

  3. DDoS mitigation: Deploy Distributed Denial of Service (DDoS) mitigation measures to protect against DDoS attacks that can disrupt content delivery services.

  4. Secure communication: Use secure communication protocols and encryption to protect data in transit between clients, nodes and origin servers.

Detect:

  1. Traffic monitoring: Implement traffic monitoring and analysis to detect abnormal or malicious traffic patterns and potential cyberattacks.

  2. Anomaly detection: Use anomaly detection mechanisms to identify unusual behaviour within the content delivery infrastructure, which may indicate a security incident.

Respond:

  1. Incident response plan: Develop an incident response plan tailored to content delivery specific incidents, such as DDoS attacks or content tampering.

  2. Security patch management: Stay informed about security updates for content delivery components and apply patches promptly to mitigate vulnerabilities.

Recover:

  1. Backup and recovery: Regularly backup content delivery configuration settings and content to ensure rapid recovery in case of data loss or a security incident.

  2. Business continuity: Develop and test business continuity plans to maintain content delivery services during disruptions.

More about NIST

Resources and further reading