The polyfill.js is a popular open-source library that supports older browsers. Thousands of sites embed it using the cdn[.]polyfill[.]io domain. In February 2024, a Chinese company (Funnull) bought the domain and the GitHub account. The company has modified Polyfill.js so malicious code would be inserted into websites that embedded scripts from cdn.polyfill[.]io. Any script adopted from cdn.polyfill[.]io would immediately download malicious code from the Chinese company's site. Some of the known outcomes are:
Given that modern browsers do not require Polyfill, the original polyfill author recommends not to use Polyfill at all. Recommended alternatives are CDN, such as Cloudflare and Fastly.
Qualys is releasing multiple detections to detect content downloaded from the CDN and sites that have been compromised.
Launch a Web Application Scan to detect vulnerable JavaScripts with the following detections:
Launch a Web Malware Scan to detect malware downloaded or malicious URLs under the following detections: