Skip to content
Tech News
← Back to articles

Hackers abuse npm mirrors to host phishing redirect pages

read original more articles
Why This Matters

This investigation reveals how hackers exploit npm and its mirrors to host malicious phishing pages, turning legitimate developer platforms into tools for cyberattacks. While not infecting users' devices directly, this tactic undermines trust in these repositories and highlights new vulnerabilities in the software supply chain. It emphasizes the need for increased vigilance and security measures in open-source ecosystems to protect consumers and developers alike.

Key Takeaways

Threat actors are abusing npm and its mirrors to host malicious HTML pages that impersonate Cloudflare CAPTCHAs to redirect visitors to attacker-controlled websites.

The technique was previously spotted in July by security researcher inf0stache, who found a 'china_airlines' npm package that used a fake Cloudflare verification page to redirect visitors to a malicious domain, and was also reported by IntelFusions.

In a later report, OX Security discovered 24 npm packages containing the same malicious HTML page hosted on npm and various mirrors.

However, unlike the typical npm supply-chain attacks we've seen lately, installing the packages does not infect a developer's computer with malware or infostealers.

Instead, attackers use the npm registry as free storage for malicious HTML pages, which are then copied by mirroring platforms like UNPKG and npmmirror.

Because some of these platforms let individual files in npm packages be accessed directly in a browser, they effectively turn these developer sites into free web hosting for phishing pages.

"While the malware is simply a single HTML page inside the npm package, and while downloading it wouldn't do harm, the threat actor's use of npm isn't to infect developers who install it, but to use the registry and its mirrors as a safe, validated storage for the malware," explains OX Security.

BleepingComputer examined one of the packages identified in the campaign and found that it contained only two files, an index.html page and a package.json file that declared the HTML file as the package's main file.

npm package containing an index.html and package.json file

Source: BleepingComputer

... continue reading