Malware & Threats

Dozens of Malicious NPM Packages Steal User, System Data

Fortinet warns of multiple malicious NPM packages that include install scripts designed to steal sensitive information.

Fortinet warns of multiple malicious NPM packages that include install scripts designed to steal sensitive information.

Fortinet’s security researchers have identified multiple malicious NPM packages containing obfuscated scripts designed to harvest a trove of information from victims’ systems.

On Monday, Fortinet warned of 35 malicious packages in the NPM Registry containing install scripts capable of collecting system and user data and exfiltrating it via a webhook or file-sharing link.

The cybersecurity company has grouped the packages into nine different sets, based on similarities in styles of code and functions, including the targeting of specific sensitive information for exfiltration.

The install scripts within these packages would run pre- or post-install to perform data harvesting, but would also be executed when the NPM package was installed.

The first set of packages includes an obfuscated index.js script capable of stealing Kubernetes configurations, SSH keys, and other sensitive information. System data such as IP address, hostname, and username is targeted as well.

The second set of packages contains an index.js file designed to send an HTTP GET request to a specific URL, to scan for specific files and directories, and to exfiltrate developer data, such as source code and configuration files.

Advertisement. Scroll to continue reading.

“The targeted files and directories may contain highly valuable intellectual property and sensitive information, such as various application and service credentials. It then archives these files and directories and uploads the resulting archives to an FTP server,” Fortinet explains.

The third and fourth sets have an index.mjs script that relies on a Discord webhook for sensitive data exfiltration, but each has a different style of coding.

The index.js install script in the fifth set of packages uses a webhook to exfiltrate hostnames, usernames, and the home directory contents.

The seventh set relies on an installer.js install script designed not only to exfiltrate sensitive data, but also to disable TLS certificate validation, rendering the connection vulnerable to eavesdropping.

The eighth set was designed to automatically fetch and execute a potentially malicious executable file, while the ninth set of packages gathers system information and exfiltrates it to a Discord webhook.

“End users should watch for packages that employ suspicious install scripts and exercise caution. We will continue hunting for and reporting malicious packages to help users avoid becoming victims,” Fortinet notes.

Related: Developers Warned of Malicious PyPI, NPM, Ruby Packages Targeting Macs

Related: Malicious NPM, PyPI Packages Stealing User Information

Related: LofyGang Cybercrime Group Used 200 Malicious NPM Packages for Supply Chain Attacks

Related Content

Malware & Threats

Since August 2023, attackers have published eight malicious packages as part of the MALFEX supply chain campaign.

Application Security

Posing as the legitimate sorted-btree package, indexed-btree hides a malware trigger in its prototype method.

Malware & Threats

The malware was designed to steal and exfiltrate secrets, and to propagate itself via stolen NPM and GitHub credentials.

Supply Chain Security

A malicious dependency the attackers added to over 140 Mastra packages fetches a payload targeting cryptocurrency extensions.

Malware & Threats

Arch Linux suspended account registrations in response to the wave of malicious packages being uploaded to AUR.

Supply Chain Security

By default, npm install will no longer execute scripts from dependencies, unless explicitly allowed.

Malware & Threats

The most recent variants of the self-propagating attacks are named Miasma and Hades.

Supply Chain Security

Hackers published 96 malicious package versions, injected with a credential-stealing worm similar to Mini Shai-Hulud.

Copyright © 2026 SecurityWeek ®, a Wired Business Media Publication. All Rights Reserved.

Exit mobile version