Skip to content
← All stories

Malware · Application Security

Malicious npm Package 'imgdecode' Found Hiding Malware in Windows Addon

Security researchers have found a malicious npm package called 'imgdecode' that targets Windows users. The package hides malware in a Windows DLL and has been downloaded nearly 1,000 times.

Ross Grant3 min read

The short version

A malicious software package called 'imgdecode' was found on the npm registry. It targets Windows users by hiding malware inside a Windows program file. If installed, it can steal sensitive files and allow attackers to control the computer. Developers who used this package should check their systems for signs of compromise.

By the numbers

  • 979Downloads of 'imgdecode' as of mid-October 2026The Hacker News
  • 5npm publisher handles used in the MALFEX campaignThe Hacker News
  • 2023-08-06Start date of the MALFEX campaignThe Hacker News

What happened?

Researchers discovered a malicious npm package called 'imgdecode' that hides malware in a Windows DLL. The package is part of a broader campaign called MALFEX and has been downloaded 979 times since being uploaded on 30 September 2026. The attackers have published several similar packages, adapting quickly when previous ones were removed.

Timeline and Discovery

Researchers have found a malicious npm package named 'imgdecode' that is part of a broader supply chain attack campaign known as MALFEX. The package was uploaded to the npm registry on 30 September 2026 by a user called 'malfexteste8'. As of mid-October, it had been downloaded 979 times and was still available for download. The campaign has been active since August 2023, with attackers repeatedly uploading new packages after previous ones were removed by npm. The attackers responded quickly to removals, publishing replacements within days.

The campaign uses several npm accounts and package names, including 'cdn-img-fetch', 'img-to-native', 'native-runner', 'runhelper', 'imgbundle', and 'imgdecode'. The attackers have shown persistence and adaptability, changing tactics and package names to avoid detection and removal.

How the Attack Works

The malicious packages are designed to target Windows systems. Unlike some other malware, these packages do not use an install hook (a script that runs automatically when the package is installed). Instead, the malicious code is triggered when certain packages are loaded in a Node.js project.

The attack chain involves several steps:

  • One package downloads an image file from a GitHub repository and extracts an encrypted blob.
  • Another package decrypts the blob and writes it to disk as an executable file.
  • A further package runs this executable, which then downloads a stealer binary from a remote server.

The 'imgdecode' package specifically includes a compiled Windows DLL (a type of Windows program library) that checks if it is running in a developer's terminal. If not, it fetches an image file from the same GitHub repository, decrypts an embedded payload, and injects it into a Windows process. This process can be turned off by the attacker by serving a harmless image instead of the malware.

What the Malware Does

Once running, the malware performs several actions:

  • It checks for signs of being analysed, such as running inside a virtual machine or with monitoring tools.
  • It searches for files containing sensitive data, including password manager databases, private keys, and environment files.
  • It steals data from web browsers, messaging apps (Discord, Telegram), cryptocurrency wallets, and gaming platforms.
  • It connects to a command-and-control server, allowing attackers to run commands, transfer files, take screenshots, and control the mouse and keyboard.
  • It creates persistence on the infected system by adding itself to the Windows Registry and creating a scheduled task.

The malware uses a licensing system, suggesting the attackers may be selling access to the malware or providing it as a service to others.

Who Is at Risk and What Should Developers Do?

Anyone who has installed 'imgdecode' or related packages on a Windows system is at risk. Developers are advised to treat any affected systems as compromised. Steps to take include isolating the system, checking for persistence mechanisms, rotating credentials, and moving funds if cryptocurrency wallets were exposed.

The npm registry has removed some of the malicious packages, but as of the latest report, 'imgdecode' was still available. The GitHub account used to host the malicious files has been taken down, but the malware infrastructure may still be active.

Ongoing Investigation and Uncertainties

This information comes from a single secondary source (The Hacker News (opens in a new tab)). There is no confirmation yet from npm, Microsoft, or law enforcement. The full extent of the impact is not yet known, and the number of affected users could change if more downloads are discovered or if the malware is found in other packages.

Claimed vs confirmed

  • Confirmed

    The 'imgdecode' npm package contains a malicious Windows DLL that steals data and allows remote control.

    Researchers reported and analysed the malicious behaviour in 'imgdecode'.

  • Confirmed

    The attackers are actively replacing removed packages with new ones to evade detection.

    The timeline shows attackers publishing new packages within days of removals.

The impact

Money
If sensitive data or credentials are stolen, affected organisations could face losses. Under UK GDPR, fines can reach £17.5m or 4% of global turnover if data protection rules are breached.
Reputation
Organisations using compromised packages may face trust issues, especially if customer data is exposed or systems are controlled by attackers.
Customers
Developers and users of affected packages risk data theft, credential compromise, and remote system control. Immediate action is needed to secure systems and accounts.

Why it matters

Software supply chain attacks like this can affect many developers and organisations, especially if malicious packages are widely downloaded. Attackers can steal sensitive data and gain control of systems, putting both individuals and companies at risk.

How does it work?

The attack uses npm packages that, when loaded, download and decrypt an image file containing an encrypted payload. This payload is then run as a Windows DLL, which injects malware into a system process. The malware can steal files, browser data, and credentials, and allows remote control of the infected system.

Key points

  1. Malicious npm package 'imgdecode' targets Windows users.
  2. The package hides malware in a Windows DLL and has been downloaded 979 times.
  3. Attackers adapt quickly, publishing new packages after removals.
  4. The malware can steal files, browser data, and credentials.
  5. Developers should check systems and rotate credentials if affected.

Sources

  1. The Hacker News

    Reference

The day's cyber news in 5 minutes.

Cyberend Daily is one short email with the stories that matter, written so anyone can follow.

No spam · 100% free · Unsubscribe anytime