company logo

Product

Our Product

We are Reshaping the way Developers find and fix vulnerabilities before they get exploited.

Solutions

By Industry

BFSI

Healthcare

Education

IT & Telecom

Government

By Role

CISO

Application Security Engineer

DevsecOps Engineer

IT Manager

Resources

Resource Library

Get actionable insight straight from our threat Intel lab to keep you informed about the ever-changing Threat landscape.

Subscribe to Our Weekly Threat Digest

Company

Contact Us

Have queries, feedback or prospects? Get in touch and we shall be with you shortly.

loading..
loading..
loading..
Loading...

CDN

Supply Chain Attack

loading..
loading..
loading..

Polyfill.io Supply Chain Attack: 100,000 Sites Compromised

Polyfill.io relaunches on a new domain after being accused of delivering malicious code to 100,000+ sites. Explore the security implications and industry impact...

29-Jun-2024
5 min read

Polyfill.io, a widely used JavaScript CDN service, has been at the center of a significant cybersecurity dispute. Following the discovery of malicious code being delivered to over 100,000 websites, the service has been relaunched on a new domain.

This Threatfeed analyzes the underlying nuances of this supply chain attack.

Background & Initial Discovery

Polyfill.io was designed to help developers add modern JavaScript functionality to older browsers. However, in February 2024, a Chinese entity named 'Funnull' acquired the polyfill.io domain and inserted malicious code into the scripts delivered by its CDN. This malicious code primarily targeted mobile devices, redirecting users to undesirable sites.

Researchers from Sansec identified the attack, noting that the compromised scripts affected more than 100,000 websites.

The malicious code injected by polyfill.io's CDN was designed to hijack mobile devices visiting websites embedding the CDN's scripts.

Analysis of the Malicious Code

The inserted malicious code was sophisticated and strategically designed to evade detection. It redirected users to sports betting sites using a typosquatted domain name (google-anaiytics[.]com), an intentional misspelling of Google Analytics.

This kind of attack highlights the potential risks of supply chain vulnerabilities, where third-party code can compromise entire networks.

Here is an instance of how such malicious code might look: MaliCode1.jpg

This script deceptively loads from a malicious domain, mimicking a legitimate service to avoid immediate suspicion.

Response and Mitigation Measures

Following the exposure, the polyfill.io domain was shut down by its registrar, Namecheap.

The service owners swiftly relaunched it on a new domain, polyfill.com, and asserted there were "no supply chain risks." They claimed all services were cached in Cloudflare, ensuring static content delivery without third-party interference.

Despite these assurances, security experts remain skeptical. Cloudflare, a prominent cloud security company, noted unauthorized use of its name and logo by polyfill.io, further eroding trust in the service. Cloudflare's CEO, Matthew Prince, highlighted the scale of the impact, revealing that tens of millions of websites had used polyfill.io, underscoring the seriousness of the breach.

Technical Deep Dive: Supply Chain Risks

Supply chain attacks like the one involving polyfill.io underscore the critical need for robust security practices. When third-party services are integrated into web applications, they become potential vectors for attacks. This incident demonstrates several key vulnerabilities:

  1. Third-Party Code Injection: The compromised polyfill.io CDN served as an entry point for malicious code. Developers must thoroughly vet third-party services and ensure they are secure.
  2. Domain Trust and Verification: The use of typosquatted domains (e.g., google-anaiytics[.]com) highlights the importance of domain verification. Implementing strict domain whitelisting can mitigate such risks.
  3. Content Caching and Delivery: While caching content in services like Cloudflare can reduce risk, it is not foolproof. Continuous monitoring and verification of cached content are essential.

Recommendations for Developers

To safeguard against similar supply chain attacks, developers should consider the following practices:

  1. Self-Hosting Critical Libraries: Instead of relying on third-party CDNs, host critical libraries on your servers. This ensures direct control over the content delivered to users.

  2. Implementing Subresource Integrity (SRI): SRI allows browsers to verify that resources fetched from a CDN have not been tampered with. This can prevent malicious modifications to scripts.

      
    
    
  3. Regular Security Audits: Conducting periodic security audits of third-party services and dependencies can identify potential vulnerabilities before they are exploited.

Role of Media and Public Perception

Polyfill.io's response to the allegations, particularly their claims of being "maliciously defamed," underscores the challenges companies face in managing public perception during a security crisis.

The service's owners have actively defended their integrity, emphasizing the use of Cloudflare caching to mitigate risks.

However, trust once lost is difficult to regain, especially when authoritative entities like Cloudflare contradict the company's claims.

Legal Implications

The legal ramifications of such a breach are significant. Companies affected by the malicious code injected through polyfill.io's CDN could potentially seek legal recourse.

Additionally, ethical considerations come into play, as the responsibility to protect user data and ensure secure services is paramount.

The incident highlights the ethical duty of service providers to maintain the highest standards of security and transparency.

Future Outlook and Industry Impact

This incident is likely to influence future industry practices regarding the use of third-party CDNs.

Developers and organizations might shift towards more secure, self-hosted solutions or rely on reputable, audited CDNs with stringent security measures.

The focus on supply chain security will intensify, driving innovation in tools and practices designed to detect and prevent such attacks.

Comparative Analysis

Comparing the Polyfill.io incident with other notable supply chain attacks, such as the SolarWinds breach, provides valuable insights into common tactics and mitigation strategies.

Both cases involved the compromise of trusted third-party services, highlighting the need for comprehensive security frameworks that encompass all aspects of the supply chain.