Google has taken action to block ads for e-commerce sites using the Polyfill.io service. This move follows the acquisition of the domain by a Chinese company, Funnull, which modified the JavaScript library to redirect users to malicious and scam sites. Over 110,000 sites that embed the library are impacted by this supply chain attack, according to a report by Sansec.
Polyfill is a widely-used library that supports modern web functions in browsers. Concerns arose in February when Funnull, a China-based content delivery network (CDN) company, purchased the domain. The original creator of Polyfill, Andrew Betts, advised website owners to remove it, stating that most web features are now adopted by major browsers without needing polyfills. Cloudflare and Fastly have provided alternative endpoints to assist users in migrating away from the compromised Polyfill.io domain.
The Dutch e-commerce security firm Sansec reported that the domain “cdn.polyfill[.]io” was injecting malware that redirected users to sports betting and pornographic sites. This malware is designed to avoid detection by reverse engineering protections and only activates on specific mobile devices at certain times. It also avoids execution when an admin user is detected or when web analytics services are found, to prevent appearing in statistics.
The incident coincides with a critical security flaw affecting Adobe Commerce and Magento websites (CVE-2024-34102), which remains largely unpatched despite available fixes since June 11, 2024. This flaw allows unauthorized access to private files and, combined with a recent Linux bug (CVE-2024-2961), could lead to remote code execution. Third parties can gain API admin access without needing a vulnerable Linux version, exacerbating the security risks.
Reference: