Lucene search

K
qualysblogSheela SarvaQUALYSBLOG:4B57C7868500E905C758DFB9FDAF34A1
HistoryJun 29, 2024 - 1:31 a.m.

Polyfill.io Supply Chain Attack

2024-06-2901:31:07
Sheela Sarva
blog.qualys.com
25
supply chain attack
polyfill.js
malicious code
alternative cdn
qualys
web security

CVSS3

7.2

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

NONE

Availability Impact

LOW

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:L

AI Score

7.4

Confidence

High

EPSS

0.001

Percentile

29.0%

The polyfill.js is a popular open-source library that helps older browsers support functionality in newer 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 that result in supply chain attack are:

  • user would be redirected to scam sites,
  • allow attackers to steal sensitive data,
  • potentially perform code execution.

Given that modern browsers do not require Polyfill, the original Polyfill author, Andrew Betts, recommends not to use Polyfill at all. All websites should remove any references to polyfill.io. Recommended alternatives are CDN such as Cloudflare and Fastly.

Impacted Domains:

The extent of damage is hard to quantify. Listed below are a subset of indicators to watch out for in your organization if your site is compromised:

Polyfill.io Timeline:

How Could A Website Be Compromised?

Efforts Done to Notify Users and Domain Owners:

  • Alerts from Google by blocking sites that use "polyfill.io"

  • Alternate solutions from Cloudflare, Fastly

Notifications and warnings were ignored, the complaints on GitHub were removed, and the altered script continued to redirect users to malicious sites.

Secure Your Website with Qualys:

Qualys provides a comprehensive continuous solution to detect security issues in organizations. You can discover all your applications in your organization using CSAM to ensure all the assets are scanned. Given the nature of the attacks possible, we highly recommend organizations to launch VM, WAS and Web Malware scans to detect and remove the usage of scripts from the polyfill.io and impacted domains. The detection of your website being compromised is possible by launching a Web Malware scan.

Qualys had existing QIDs that would have informed you of the possibility of the attack. Qualys has kept up with the research and released multiple detections to detect the usage of malicious domains and sites that have been compromised. If your scans report any of the following QIDs, please immediately follow the preventive measures we have provided in your reports.

VMDR Scan to detect if your assets are vulnerable:

Web Application Scan to detect if your website is vulnerable:

  • QID:152105: Javascript in pdoc uses polyfill.io (CVE-2024-38526)

  • QID 152102: Malicious Polyfill.io Detected

  • QID 151040: Vulnerable JavaScript Detected - Polyfill.js

  • QID 150261: Subresource Integrity (SRI) Not Implemented

       In anticipation of events such as these Qualys research had released a Subresource Integrity check in 2020.
    
       If you see this IG QID reported, please ensure you take precautions to include integrity attribute to all elements that load external content.
    

Web Malware Scan to detect malware on your website**:**

  • QID 207003: A Match to a Known Virus was Detected

  • QID 208000: Content was Loaded from a Remote Malicious Page

  • QID 208001: A Link to a Malicious Page was Found

  • QID 208002: Your Web Site Domain is Blacklisted

References:

CVSS3

7.2

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

NONE

Availability Impact

LOW

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:L

AI Score

7.4

Confidence

High

EPSS

0.001

Percentile

29.0%

Related for QUALYSBLOG:4B57C7868500E905C758DFB9FDAF34A1