Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 944

Polyfill.io Supply-Chain Attack (2024)

Reviewed byCybersecurity entrepreneur & security researcher

What is Polyfill.io Supply-Chain Attack (2024)?

Polyfill.io Supply-Chain Attack (2024)A June 2024 supply-chain compromise in which the polyfill.io CDN, after being acquired by a Chinese-linked company, began serving malicious JavaScript to an estimated 100,000+ sites embedding its widely-used `<script>` tag.


The Polyfill.io supply-chain attack is a 2024 incident centred on cdn.polyfill.io, a long-running free service that returned per-browser JavaScript polyfills. In February 2024 the original maintainer, Andrew Betts, publicly warned that the domain and GitHub account had been transferred to a new operator, Funnull, without his involvement and advised sites to remove the script; the warning was largely ignored. In June 2024 Sansec confirmed the CDN was dynamically injecting malicious code — fingerprinting visitors, evading admin users and analytics, and redirecting mobile users to sports-betting and scam pages. Researchers linked Funnull to parallel incidents against bootcss.com, bootcdn.net, and staticfile.org.

The attack is a textbook demonstration of why dynamic third-party scripts are uniquely dangerous: a single <script> tag grants the CDN full execution rights in every visitor's session, and because the payload was served conditionally, it evaded casual inspection. Estimates of affected sites ranged from Sansec's ~100,000 to broader campaign figures of hundreds of thousands. Response was swift: Namecheap suspended the domain, Google warned advertisers about redirecting landing pages, and Cloudflare and Fastly stood up trusted mirrors (Cloudflare also rewrote cdn.polyfill.io requests on its network). The durable lesson is defensive engineering — pin third-party scripts with Subresource Integrity (SRI) hashes, self-host critical dependencies, and apply a restrictive script-src Content Security Policy so that a silent ownership change cannot become remote code execution in the browser.

flowchart LR
  A[Legitimate polyfill.io<br/>maintained by Andrew Betts] -->|Feb 2024 domain sold| B[Funnull-controlled CDN]
  B --> C{Request fingerprinting}
  C -->|Admin / crawler / desktop| D[Serve clean polyfill]
  C -->|Targeted mobile user| E[Inject malicious JS]
  E --> F[Redirect to scam / betting sites]
  G["Website &lt;script src=cdn.polyfill.io&gt;"] --> B
  H[Defences] -.-> I[Subresource Integrity hash]
  H -.-> J[Self-host polyfills]
  H -.-> K["CSP script-src allowlist"]
  I -.->|blocks altered script| G
  J -.->|removes dependency| G
  K -.->|restricts origins| G

● Examples

  1. 01

    A retailer including `<script src="https://cdn.polyfill.io/v2/polyfill.min.js">` for legacy IE support began serving redirect-to-scam JS to mobile users overnight.

  2. 02

    Defenders responded by migrating to self-hosted polyfills or to Cloudflare's safe mirror, then adopting subresource integrity for any remaining third-party scripts.

● Frequently asked questions

What is Polyfill.io Supply-Chain Attack (2024)?

A June 2024 supply-chain compromise in which the polyfill.io CDN, after being acquired by a Chinese-linked company, began serving malicious JavaScript to an estimated 100,000+ sites embedding its widely-used `<script>` tag. It belongs to the Attacks & Threats category of cybersecurity.

What does Polyfill.io Supply-Chain Attack (2024) mean?

A June 2024 supply-chain compromise in which the polyfill.io CDN, after being acquired by a Chinese-linked company, began serving malicious JavaScript to an estimated 100,000+ sites embedding its widely-used `<script>` tag.

How do you defend against Polyfill.io Supply-Chain Attack (2024)?

Defences for Polyfill.io Supply-Chain Attack (2024) typically combine technical controls and operational practices, as detailed in the full definition above.

What are other names for Polyfill.io Supply-Chain Attack (2024)?

Common alternative names include: Polyfill.io attack, Funnull CDN attack.

● Related terms