All vulnerabilities
HIGHSupply chainexploited in the wildcurated

SC-POLYFILL-IO-2024

CDN · polyfill.io

Summary

polyfill.io was a free, much-loved service that hundreds of thousands of websites embedded to make older browsers work, the kind of invisible utility you set up once and forget. That is exactly what made it dangerous. In February 2024 a Chinese-operated company bought the polyfill.io domain and its GitHub account from the original maintainer, who publicly warned that nobody should trust it anymore. Months later the CDN began injecting malware into the sites that still loaded its script (initial reports counted over 100,000; later scans found more than 384,000), redirecting mobile visitors to scam and betting sites. It is the lesson that a third-party script in your page is a permanent, live trust relationship, and that "who owns this domain now?" is a question you have to keep asking.

How it happened

polyfill.io served JavaScript "polyfills", small pieces of code that make modern web features work in older browsers, from cdn.polyfill.io, embedded through a simple <script> tag on what was first reported as 100,000-plus sites and later counted at more than 384,000. In February 2024 the domain and its GitHub repository were acquired by Funnull, a Chinese-operated CDN company. The project's original maintainer, Andrew Betts, immediately and publicly warned that the service should no longer be trusted and that modern browsers did not need it at all.

After the takeover, the CDN started injecting malicious JavaScript, and it did so cleverly to stay hidden. The code activated selectively, targeting mobile visitors, varying by time, and refusing to run when it detected an administrator's cookies or a security researcher, and it redirected victims to scam and sports-betting sites through a typosquatted fake Google Analytics domain (googie-anaiytics.com). Because every one of those sites was loading the script live, each was unknowingly serving the attack to its own users. It is a supply-chain attack carried out not by hacking, but simply by buying the domain and then abusing the trust that came with it.

The damage and response

The estimate of affected sites climbed from an initial 100,000-plus to more than 384,000 (Censys), with some reporting reaching 490,000, among them JSTOR, Intuit, and the World Economic Forum. After researchers raised the alarm in June 2024, the response was fast: Cloudflare deployed real-time rewrites that swapped polyfill.io links for its own safe mirror, Google blocked ads for impacted sites, and the domain's registrar, Namecheap, put it on hold. Researchers also found that a leaked Cloudflare API key in the polyfill repository exposed sibling CDN domains (bootcss, bootcdn, staticfile) referenced by over 1.6 million more hosts. In 2025 the US Treasury sanctioned Funnull and its administrator, tying the operation to more than $200 million in online-scam losses and naming the polyfill.io attack by name.

Why polyfill.io still matters

It is the live-third-party-script lesson, compounded by the risk of ownership changing hands. When you embed a remote <script>, you grant whoever controls that domain the power to run any code in your users' browsers, indefinitely, and that control can be sold to anyone without your knowledge. The defences are clear: self-host third-party scripts or lock them with Subresource Integrity (SRI) so a changed file is rejected, remove dependencies you do not actually need (modern browsers did not need polyfill.io), keep an inventory of every external resource your pages load, and watch for ownership and domain changes. It is the same CDN-served-malware pattern as the Ledger Connect Kit attack.

How to fix it

  • Remove the polyfill.io script from your sites immediately, or repoint it to a trusted mirror (Cloudflare and Fastly published safe ones); modern browsers do not need it.
  • Audit your pages for any other third-party scripts loaded live from domains you do not control, and self-host or SRI-lock them.
  • Check analytics for malicious redirects served to your users during the window, and notify them if warranted.

How to avoid it

  • Self-host third-party scripts or lock them with Subresource Integrity (SRI) so a changed file is rejected, rather than loading them live from a domain you do not control.
  • Remove dependencies you do not actually need; the safest third-party script is the one you deleted.
  • Watch for ownership and domain changes of services you embed; a sale can hand your users' browsers to a new, untrusted owner overnight.
  • Maintain an inventory of every external resource your pages load, and review it the way you review code dependencies.

References

Related vulnerabilities

All Supply chain →