The new Chinese owner of the popular Polyfill JS project injects malware into more than 100 thousand sites

0x815@feddit.org to Technology@lemmy.world – 899 points –
Polyfill supply chain attack hits 100K+ sites
sansec.io

Archived link

The polyfill.js is a popular open source library to support older browsers. 100K+ sites embed it using the cdn.polyfill.io domain. Notable users are JSTOR, Intuit and World Economic Forum. However, in February this year, a Chinese company bought the domain and the Github account. Since then, this domain was caught injecting malware on mobile devices via any site that embeds cdn.polyfill.io. Any complaints were quickly removed (archive here) from the Github repository.

116

You are viewing a single comment

A whitelist wouldn't mitigate this issue entirely due to bundling

In this case the script wasn't bundled at all - it was hotlinked from a third party CDN. Adding malicious code instantly affects all the sites that load it.

The output differs depending on browser (it only loads the polyfills your browser needs) so it's incompatible with subresource integrity.